Re: linker problem: relocation truncated to fit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Sep 16, 2001 at 03:38:57PM -0700, Ryan Murray wrote:
> On Mon, Sep 17, 2001 at 12:07:19AM +0200, Petter Reinholdtsen wrote:
> > [Wilbern Cobb]
> > > This is a `feature' of the MIPS toolchain. Global and static items <= n
> > > bytes are placed into the small data or small bss sections instead of
> > > the normal data or bss sections as an optimization. Excess items would
> > > cause these linker errors.
> > > 
> > > Pass the compiler the -Gn flag (default is 8 bytes), ie. -G4 should work
> > > for most purposes.
> > 
> > I tried -G4, -G2 and -G1 without any luck.  Even with -G1 there are still
> 
> I don't think -G is the problem here.  The problem is that the GOT
> needs to be bigger than a 16 bit value.  The only way to do this is to
> recompile everything that is going to be linked in statically
> (libc_noshared.a and libgcc.a included) with -Wa,-xgot This problem
> currently affects openh323 and mozilla, among other things.
> 

I don't think mips is the only platform which has this problem. Do
Alpha, PowerPC and Sparc have similar problems like that? What are
the solutions for them?

BTW, it sounds like the -fpic vs. -fPIC issue. 


H.J.


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux