ld: warning: gc-sections option ignored

William Tambe tambewilliam@gmail.com
Sat Aug 3 03:54:00 GMT 2019


I am currently porting binutils, but the use of -Wl,--gc-sections
display the following warning and the final executable is huge with
unused functions:
ld: warning: gc-sections option ignored

I am using the above options as follow in an attempt to remove unused
functions from the final executable:
-fdata-sections -ffunction-sections -Wl,--gc-sections

Any idea, what needs to be implemented when porting binutils-ld in
order to avoid the warning:
ld: warning: gc-sections option ignored



More information about the Binutils mailing list