This is the mail archive of the
mailing list for the binutils project.
Re: ld: --gc-sections incompatible with --emit-relocs ?
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.