This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Allow different values than ELFOSABI_SYSV for ELF OSABI
- From: Roland McGrath <roland at redhat dot com>
- To: Aurelien Jarno <aurelien at aurel32 dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 3 Feb 2006 15:47:52 -0800 (PST)
- Subject: Re: [PATCH] Allow different values than ELFOSABI_SYSV for ELF OSABI
Every glibc configuration should accept DSOs with the standard header
format, which means ELFOSABI_SYSV. If your configuration wants to accept
others too, then you should follow the example of the arm and hppa ports,
which already do this:
#define VALID_ELF_ABIVERSION(ver) (ver == 0)
#define VALID_ELF_OSABI(osabi) \
(osabi == ELFOSABI_SYSV || osabi == ELFOSABI_ARM)
#define VALID_ELF_HEADER(hdr,exp,size) \
memcmp (hdr,exp,size-2) == 0 \
&& VALID_ELF_OSABI (hdr[EI_OSABI]) \
&& VALID_ELF_ABIVERSION (hdr[EI_ABIVERSION])
Thanks,
Roland