This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH,HURD] Recognize GNU/Hurd-specific binaries
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Thomas Schwinge <thomas at codesourcery dot com>
- Cc: <libc-alpha at sourceware dot org>, Samuel Thibault <samuel dot thibault at gnu dot org>, <bug-hurd at gnu dot org>
- Date: Wed, 29 May 2013 15:01:40 -0700 (PDT)
- Subject: Re: [PATCH,HURD] Recognize GNU/Hurd-specific binaries
- References: <20110619130724 dot GV6349 at const dot famille dot thibault dot fr> <20110619174812 dot E401B2C131 at topped-with-meat dot com> <20110619181007 dot GY27884 at const dot famille dot thibault dot fr> <20110619180438 dot C7CFF2C0F1 at topped-with-meat dot com> <20110619182247 dot GZ27884 at const dot famille dot thibault dot fr> <20110619184620 dot 6E7732C0E4 at topped-with-meat dot com> <20110703141939 dot GD11935 at const dot famille dot thibault dot fr> <87bo7xo1ay dot fsf at kepler dot schwinge dot homeip dot net>
> First, my "usual" cleanup patch:
>
> * sysdeps/unix/sysv/linux/ldsodefs.h (VALID_ELF_OSABI)
> (VALID_ELF_ABIVERSION, MORE_ELF_HEADER_DATA): Use ELFOSABI_GNU
> instead of ELFOSABI_LINUX.
>
> ports/ChangeLog.arm
> * sysdeps/unix/sysv/linux/arm/ldsodefs.h (VALID_ELF_OSABI)
> (MORE_ELF_HEADER_DATA): Use ELFOSABI_GNU instead of ELFOSABI_LINUX.
>
> ports/ChangeLog.mips
> * sysdeps/unix/sysv/linux/mips/ldsodefs.h (VALID_ELF_ABIVERSION):
> Use ELFOSABI_GNU instead of ELFOSABI_LINUX.
This is fine.
> I suggest we instead implement this in sysdeps/gnu/ldsodefs.h, as this is
> a common GNU thing.
That is a good thing to do.
> Tested on x86 and x86_64 GNU/Linux, and x86 GNU/Hurd; glibc testsuite as
> well as manually as follows:
Verify on x86_64-linux-gnu that the change has no effect whatsoever on the
compiled code.
> * sysdeps/unix/sysv/linux/ldsodefs.h (VALID_ELF_HEADER)
> (VALID_ELF_OSABI, VALID_ELF_ABIVERSION, MORE_ELF_HEADER_DATA):
> Move macros to...
> * sysdeps/gnu/ldsodefs.h: ... this new file.
With that verified, this is fine.
> +++ sysdeps/gnu/ldsodefs.h
> @@ -0,0 +1,48 @@
> +/* Run-time dynamic linker data structures for loaded ELF shared objects.
I'd use something actually describes this file.
That's the description of sysdeps/generic/ldsodefs.h, really.
Thanks,
Roland