This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] glibc 2.2.94 - hppa - plt relocations
- From: Alan Modra <amodra at bigpond dot net dot au>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: Carlos O'Donell <carlos at baldric dot uwo dot ca>, libc-alpha at sources dot redhat dot com, debian-glibc at lists dot debian dot org
- Date: Mon, 23 Sep 2002 15:13:29 +0930
- Subject: Re: [PATCH] glibc 2.2.94 - hppa - plt relocations
- References: <20020923000217.GA23275@systemhalted> <3D8E5EE6.email@example.com>
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
IBM OzLabs - Linux Technology Centre