[PATCH] ldso - adding HAVE_RELATIVE_RELOCS define - updated

Joakim Tjernlund Joakim.Tjernlund at transmode.se
Tue Jan 6 21:32:12 UTC 2009



> -----Original Message-----
> From: uclibc-bounces at uclibc.org [mailto:uclibc-bounces at uclibc.org] On Behalf Of Carmelo Amoroso
> Sent: den 6 januari 2009 22:14
> To: olsajiri at gmail.com
> Cc: uclibc at uclibc.org
> Subject: Re: [PATCH] ldso - adding HAVE_RELATIVE_RELOCS define - updated
> 
> olsajiri at gmail.com wrote:
> > Hi,
> > I moved the HAVE_RELATIVE_RELOCS to the dl-sysdep.h.
> > Also found there were warnings of non used variables due to the
> > ifdef'ed block. The rest is the same.
> >
> >
> > As the former comment suggested, I added the HAVE_RELATIVE_RELOCS and
> > and reduced the linker code size.
> >
> >  [Nr] Name              Type            Addr     Off    Size   ES Flg Lk Inf Al
> > -[ 6] .text             PROGBITS        00000a2c 000a2c 00323e 00  AX  0   0  4
> > +[ 6] .text             PROGBITS        00000a2c 000a2c 003133 00  AX  0   0  4
> >
> > I suppose most of the linkers support -Bsymbolic,
> > but I could verify only i386 and arm.
> >
> > Signed-off-by: Jiri Olsa <olsajiri at gmail.com>
> 
> Hi Jiri,
> sorry for not having commented this in the previou reply,
> but I'd prefer to use a "positive logic" and define a macro
> for those archs that needs to perform bootstrap relocation, instead
> of specifying that the arch has only relative relocations at bootstrap.
> 
> So, instead of using if !defined (HAVE_RELATIVE_RELOCS), I'd wrote
> #ifdef ARCH_NEEDS_BOOTSTRAP_RELOCS or something similar.
> 
> So, just define the macro for those archs that require this.
> 
> Do you agree ?

I do, and you should add a test that the number of non relative relocs are zero
and error out it they aren't.
In the long run we should get rid of -Bsymbolic I think but that is
a problem for another day.

 Jocke



More information about the uClibc mailing list