This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [MIPS] Drop .dynsym symbol ordering requirement and nullify DT_GNU_XHASH
- From: Rich Felker <dalias at libc dot org>
- To: "Maciej W. Rozycki" <macro at linux-mips dot org>
- Cc: Fangrui Song <i at maskray dot me>, libc-alpha at sourceware dot org, binutils at sourceware dot org, Nick Clifton <nickc at redhat dot com>, Joseph Myers <joseph at codesourcery dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Carlos O'Donell <carlos at redhat dot com>, Dragan Mladjenovic <dragan dot mladjenovic at rt-rk dot com>, Petar Jovanovic <petar dot jovanovic at rt-rk dot com>, Mihailo Stojanovic <mihailo dot stojanovic at rt-rk dot com>, Sava Jakovljev <sava dot jakovljev at rt-rk dot com>, Cary Coutant <ccoutant at gmail dot com>, Simon Atanasyan <simon at atanasyan dot com>
- Date: Wed, 29 Jan 2020 16:05:59 -0500
- Subject: Re: [MIPS] Drop .dynsym symbol ordering requirement and nullify DT_GNU_XHASH
- References: <20191228204512.4nguaqanafgbkots@gmail.com> <alpine.LFD.2.21.2001291845050.2508990@eddie.linux-mips.org>
On Wed, Jan 29, 2020 at 06:59:01PM +0000, Maciej W. Rozycki wrote:
> On Sat, 28 Dec 2019, Fangrui Song wrote:
>
> > As I understand it, the benefits of the symbol ordering requirement come from
> > the following:
>
> There are no benefits; the requirement comes from the GOT being relocated
> implicitly (i.e. without the use of dynamic relocations, as it is usually
> done, and based solely on dynamic entries providing ranges and then the
> correlation between GOT entries and the corresponding dynsym entries), as
> defined by the ELF MIPS psABI, long ago in mid 1990s when ELF was new and
> people were still experimenting with it in various ways.
>
> You could lift the requirement, but it would be a significant ABI change,
> requiring the addition of suitable dynamic relocations for GOT entries and
> then updating toolchains and runtimes across the world.
>
> This would typically only be done with an otherwise major incompatible
> change to the ABI, and it has actually been, for the nanoMIPS ISA.
I don't see how it requires any incompatible change. R_MIPS_REL32 is
valid for non-PLT GOT slots and R_MIPS_JUMP_SLOT is valid for PLT
ones.
Rich