This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Failed at -Wl,-nmagic


-static just fixes the issue caused by --nmagic. If -Wl,--nmagic + -static do not help, I would suggest you write a linker script for your needs.

On 12/02/2009 10:06 PM, Pan ruochen wrote:
But -static still enlarges the size of the output image. Maybe more
than the section alignment
which is 64K for my toolchain.

This is because --nmagic disable linking against shared libraries (but not
mentioned in the ld manual). GCC doesn't know that and still passes -lgcc_s
to ld. But libgcc_s.a cannot be found. Adding -static when linking should
work for you.


Jie



PRC Dec 2,2009


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]