ld: --gc-sections incompatible with --emit-relocs ?

Nick Clifton nickc@redhat.com
Fri Oct 13 06:56:00 GMT 2006

Hi David,

> In that case, it means the linker should be able to emit relocations
> only for non garbage collected sections. I do not see any interest in
> emitting relocations for sections that have been removed.

But the linker does not know why you want the relocations emitted.  For 
all it knows the user may need the relocations associated with the 
garbage collected sections.  Hence it has to play safe and keep them.


More information about the Binutils mailing list