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

Re: [PATCH] glibc 2.2.94 - hppa - plt relocations



On Sun, Sep 22, 2002 at 05:23:02PM -0700, Ulrich Drepper wrote:
> Carlos O'Donell wrote:
> > The next patch fixes plt relocations for hppa.
> > Unfortunately this requires 'map' to be passed around 
> > like a hot potato. Any comments on this patch would
> > be much appreciated. 
> 
> This patch definitely will not go in.  It makes code on sane 
> architectures run slower without any reason.

Every elf_machine_rel*_relative function is declared "static inline".
They're all small functions.  Therefore, gcc will inline them, and
unused parameters will be optimised away.  This is not just an idle
claim.  x86 ld.so built using current gcc has zero differences in
generated code after the hppa patch is applied, with the exception of
a couple of assert line numbers.

Can you show even one architecture where ld.so will "run slower"?

> Why don't you step back and redesign the relocations.  I don't see the 
> need for something as this approach.

It may be possible to redesign the relocations, or at least the
hppa dl-machine.h code, but I don't have time and I think the approach
used in the patch is the cleanest available.  eg. another approach
would be to add the load address to the ltp entry, but RELA targets
shouldn't be reading section contents.  This would also require a
binutils change as ld currently leaves the field zero.

I'll also note that the patch as it stands should be rejected for
another reason, and that is that it isn't complete.  eg. I needed to
patch sysdeps/i386/dl-machine.h elf_machine_rela_relative to add the
extra param.

-- 
Alan Modra
IBM OzLabs - Linux Technology Centre



Reply to: