Where/how does Apples GCC store DWARF inside an executable?
I compiled a binary via gcc -gdwarf-2 (Apples GCC). However, neither objdump -g
gcc -gdwarf-2
objdump -g
It seems it actually doesn't.
I traced dsymutil and it reads all the *.o files. objdump -h also lists all the debug info in them.
dsymutil
*.o
objdump -h
So it seems that those info isn't copied over to the binary.
Some related comments about this can also be found here.