This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
gc-sections & debug info
Hi all,
We have been having problems were insight was showing weird problems with
finding functions and setting breakpoints.
I have traced it down - we use --gc-sections and the linker is correctly
removing all the functions that are not referenced, however leaves all the
debug info for those sections.
Objdump shows all the removed functions at address 0 and then gives offsets
relative to zero for all the c-lines.
Gdb loads this info and thinks that the lines are executable but at invalid
addresses and gets confused.
Any ideas as to how to encourage the linker to remove the debug info for
functions/data that have been removed by gc-sections?
Thanks
Nick