r1128 - in trunk/glibc-2.3-head: patches/fixes sysdeps/kfreebsd
Author: aurel32
Date: 2006-02-04 18:32:19 +0000 (Sat, 04 Feb 2006)
New Revision: 1128
Removed:
trunk/glibc-2.3-head/patches/fixes/elfosabi.patch
Modified:
trunk/glibc-2.3-head/sysdeps/kfreebsd/dl-machine.h
Log:
Change the OSABI in dl-machine.h, without touching to elf/dl-load.c, as suggested by Roland.
Deleted: trunk/glibc-2.3-head/patches/fixes/elfosabi.patch
===================================================================
--- trunk/glibc-2.3-head/patches/fixes/elfosabi.patch 2006-02-04 13:45:24 UTC (rev 1127)
+++ trunk/glibc-2.3-head/patches/fixes/elfosabi.patch 2006-02-04 18:32:19 UTC (rev 1128)
@@ -1,29 +0,0 @@
---- elf/dl-load.c.orig 2005-04-06 04:50:10.000000000 +0200
-+++ elf/dl-load.c 2006-01-13 20:50:51.000000000 +0100
-@@ -1478,12 +1478,16 @@
- static int
- open_verify (const char *name, struct filebuf *fbp)
- {
-+ /* This is the expected ELF OSABI */
-+#ifndef ELF_OSABI
-+# define ELF_OSABI ELFOSABI_SYSV
-+#endif
- /* This is the expected ELF header. */
- #define ELF32_CLASS ELFCLASS32
- #define ELF64_CLASS ELFCLASS64
- #ifndef VALID_ELF_HEADER
- # define VALID_ELF_HEADER(hdr,exp,size) (memcmp (hdr, exp, size) == 0)
--# define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV)
-+# define VALID_ELF_OSABI(osabi) (osabi == ELF_OSABI)
- # define VALID_ELF_ABIVERSION(ver) (ver == 0)
- #endif
- static const unsigned char expected[EI_PAD] =
-@@ -1495,7 +1499,7 @@
- [EI_CLASS] = ELFW(CLASS),
- [EI_DATA] = byteorder,
- [EI_VERSION] = EV_CURRENT,
-- [EI_OSABI] = ELFOSABI_SYSV,
-+ [EI_OSABI] = ELF_OSABI,
- [EI_ABIVERSION] = 0
- };
- static const struct
Modified: trunk/glibc-2.3-head/sysdeps/kfreebsd/dl-machine.h
===================================================================
--- trunk/glibc-2.3-head/sysdeps/kfreebsd/dl-machine.h 2006-02-04 13:45:24 UTC (rev 1127)
+++ trunk/glibc-2.3-head/sysdeps/kfreebsd/dl-machine.h 2006-02-04 18:32:19 UTC (rev 1128)
@@ -21,6 +21,11 @@
/* Contrary to most kernels which use ELFOSABI_SYSV aka ELFOSABI_NONE,
FreeBSD uses ELFOSABI_FREEBSD for the OSABI field. */
-#define ELF_OSABI ELFOSABI_FREEBSD
+# define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV)
+# define VALID_ELF_ABIVERSION(ver) (ver == 0)
+# 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])
#include_next "dl-machine.h"
Reply to: