ld: warning: gc-sections option ignored

Alan Modra amodra@gmail.com
Wed Aug 7 05:52:00 GMT 2019

On Fri, Aug 02, 2019 at 10:54:20PM -0500, William Tambe wrote:
> Any idea, what needs to be implemented when porting binutils-ld in
> order to avoid the warning:
> ld: warning: gc-sections option ignored

Assuming your target is ELF, at a minimum
#define elf_backend_can_gc_sections 1

Depending on your target relocations, you may also need to override
various *_gc_* functions in elfxx-target.h.

Alan Modra
Australia Development Lab, IBM

More information about the Binutils mailing list