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: "Maciej W. Rozycki" <macro at linux-mips dot org>
- To: Rich Felker <dalias at libc 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: Fri, 31 Jan 2020 13:24:42 +0000 (GMT)
- 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> <20200129210559.GL30412@brightrain.aerifal.cx> <alpine.LFD.2.21.2001292124080.2508990@eddie.linux-mips.org> <20200129220452.GO30412@brightrain.aerifal.cx>
On Wed, 29 Jan 2020, Rich Felker wrote:
> > Also I'm not sure if that further complication is going to make things
> > better, as then not only you'll have to handle the original SVR4 MIPS
> > psABI binaries, but these new ones with explicitly relocated GOT as well.
> > Which means more arcane platform code to maintain. Why do you think it is
> > going to be beneficial?
>
> Where do you mean more code to maintain? On the side of tools
> generating binaries, it's not clear to me what the net effect is; you
> avoid the need for new MIPS-specific GNU hash code, but have to add a
> code path to avoid use of the existing MIPS-specific implicit GOT and
> generate normal GOT slots instead. On the dynamic linker side, no new
> code whatsoever is needed; it just works (even with versions of the
> dynamic linker from before it was added).
Yeah, I guess dynamic loading could just work by chance with the two
relocations; not that it was architected.
However you do need to make a suitable change to the toolchain to be able
to produce the modified ELF structure and then keep existing code as well
for systems that require the old stuff. Similarly to the current `-mplt'
option and its `-mno-plt' counterpart, and all the resulting hairy bits
especially in LD.
Also as I say, that cannot handle the local part of the GOT, as we have
no MIPS relocation to express the desired relocation by the base address,
so you'll end up with hybrid images that are unlike other psABI stuff and
not like regular MIPS psABI stuff either.
Maciej