This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCH] Initialise the machine specific part of rtld bootstrap map
- From: Matthew Fortune <Matthew dot Fortune at imgtec dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, "Sandra Loosemore (sandra at codesourcery dot com)" <sandra at codesourcery dot com>, "Petar Jovanovic" <Petar dot Jovanovic at imgtec dot com>
- Date: Wed, 26 Oct 2016 21:01:15 +0000
- Subject: RE: [PATCH] Initialise the machine specific part of rtld bootstrap map
- Authentication-results: sourceware.org; auth=none
- References: <6D39441BF12EF246A7ABCE6654B0235380AABFF9@HHMAIL01.hh.imgtec.org> <alpine.DEB.2.20.1610262008570.29499@digraph.polyomino.org.uk>
Joseph Myers <joseph@codesourcery.com> writes:
> On Wed, 26 Oct 2016, Matthew Fortune wrote:
>
> > +# ifdef ELF_MACHINE_INIT_MAP
> > + ELF_MACHINE_INIT_MAP (bootstrap_map); # endif
>
> We don't encourage use of #ifdef like that. It's better to have an
> inline function defined everywhere and used unconditionally, for which
> most systems have a dummy definition (see dl-machine-reject-phdr.h and
> elf_machine_reject_phdr_p for an example - if you have a header for a
> single function, you don't need to update lots of dl-machine.h headers,
> just add a generic version - which has the comments detailing the
> semantics of the function and when it's needed - and a MIPS version).
Thanks Joseph. It's been a while since I did a glibc patch and couldn't
remember the recommended approach.
Do you think I should add a whole new header for this? Or, since this
is directly related to the reject_phdr feature for MIPS and only MIPS
is affected then I could just add it to dl-machine-reject-phdr.h?
Matthew