relocation truncated to fit

Mahmood Naderan via gcc-help gcc-help@gcc.gnu.org
Mon Feb 5 06:18:00 GMT 2018


Thank you. It seems that -mcmodel=large can fix that, too.

Regards,
Mahmood 

    On Sunday, February 4, 2018, 6:54:05 AM EST, Andrew Haley <aph@redhat.com> wrote:  
 
 On 03/02/18 09:15, Mahmood Naderan via gcc-help wrote:
> How can I fix the following linker error? There is a good guide about that (https://www.technovelty.org/c/relocation-truncated-to-fit-wtf.html) but I don't know which flag should I fix to fix that.

What does -fno-common do?  Does that fix it?  But really, your problem is
that some file in your compilation is allocating truly vast static data.


-- 
Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
  


More information about the Gcc-help mailing list