26 lines · c
1/*2 * This file is used to test dsymutil support for call site entries3 * (DW_TAG_call_site / DW_AT_call_return_pc).4 *5 * Instructions for regenerating binaries (on Darwin/x86_64):6 *7 * 1. Copy the source to a top-level directory to work around having absolute8 * paths in the symtab's OSO entries.9 *10 * mkdir -p /Inputs/ && cp call-site-entry.c /Inputs && cd /Inputs11 *12 * 2. Compile with call site info enabled.13 *14 * clang -g -O1 -Xclang -disable-llvm-passes call-site-entry.c -c -o call-site-entry.macho.x86_64.o15 * clang call-site-entry.macho.x86_64.o -o call-site-entry.macho.x86_6416 *17 * 3. Copy the binaries back into the repo's Inputs directory. You'll need18 * -oso-prepend-path=%p to link.19 */20 21__attribute__((optnone)) int f() {}22 23int main() {24 f();25}26