Failed at -Wl,-nmagic

Jie Zhang jie.zhang@analog.com
Wed Dec 2 15:14:00 GMT 2009


-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



More information about the Binutils mailing list