[PATCH] ldso - adding HAVE_RELATIVE_RELOCS define - updated

Carmelo Amoroso carmelo73 at gmail.com
Tue Jan 6 21:13:36 UTC 2009


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 ?

> ---

[SNIP]
>  			}
> +#endif // !defined(HAVE_RELATIVE_RELOCS)
and do not use C++ style comment, please.


Thanks,
Carmelo


More information about the uClibc mailing list