From 567c63af19d2f03836d14856596b4ae6259c03a8 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 10 Jun 1996 13:03:12 +0000 Subject: [PATCH] * elf/link.h: Include elfclass.h to define __ELF_NATIVE_CLASS. (ElfW, ELFW): Use it. * elf/Makefile (headers): Add elfclass.h. * sysdeps/wordsize-32/elfclass.h: New file. * sysdeps/wordsize-64/elfclass.h: New file. * sysdeps/alpha/Implies: Add wordsize-64. * sysdeps/i386/Implies: Add wordsize-32. * sysdeps/m68k/Implies: Add wordsize-32. * sysdeps/mips/Implies: Add wordsize-32. * sysdeps/sparc/Implies: Add wordsize-32. --- ChangeLog | 11 +++++++++++ elf/Makefile | 2 +- elf/link.h | 8 +++----- sysdeps/alpha/Implies | 1 + sysdeps/i386/Implies | 1 + sysdeps/m68k/Implies | 1 + sysdeps/mips/Implies | 1 + sysdeps/sparc/Implies | 1 + sysdeps/wordsize-32/elfclass.h | 5 +++++ sysdeps/wordsize-64/elfclass.h | 5 +++++ 10 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 sysdeps/wordsize-32/elfclass.h create mode 100644 sysdeps/wordsize-64/elfclass.h diff --git a/ChangeLog b/ChangeLog index 16f8c5b..231facf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ Mon Jun 10 06:14:03 1996 Roland McGrath + * elf/link.h: Include elfclass.h to define __ELF_NATIVE_CLASS. + (ElfW, ELFW): Use it. + * elf/Makefile (headers): Add elfclass.h. + * sysdeps/wordsize-32/elfclass.h: New file. + * sysdeps/wordsize-64/elfclass.h: New file. + * sysdeps/alpha/Implies: Add wordsize-64. + * sysdeps/i386/Implies: Add wordsize-32. + * sysdeps/m68k/Implies: Add wordsize-32. + * sysdeps/mips/Implies: Add wordsize-32. + * sysdeps/sparc/Implies: Add wordsize-32. + * sysdeps/mach/hurd/dl-sysdep.c (__open): Define this instead of open. (__close, __mmap): Likewise define with __ names now. diff --git a/elf/Makefile b/elf/Makefile index 34be12e..06aeb75 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -20,7 +20,7 @@ subdir := elf -headers = elf.h link.h dlfcn.h +headers = elf.h elfclass.h link.h dlfcn.h routines = init-first $(dl-routines) dl-open dl-symbol dl-support # The core dynamic linking functions are in libc for the static and diff --git a/elf/link.h b/elf/link.h index f7bca97..6d284cb 100644 --- a/elf/link.h +++ b/elf/link.h @@ -25,15 +25,13 @@ Cambridge, MA 02139, USA. */ #include -#define __ELF_WORDSIZE 32 /* XXX */ - /* We use this macro to refer to ELF types independent of the native wordsize. `ElfW(TYPE)' is used in place of `Elf32_TYPE' or `Elf64_TYPE'. */ -#define ElfW(type) _ElfW (Elf, __ELF_WORDSIZE, type) -#define ELFW(type) _ElfW (ELF, __ELF_WORDSIZE, type) +#define ElfW(type) _ElfW (Elf, __ELF_NATIVE_CLASS, type) +#define ELFW(type) _ElfW (ELF, __ELF_NATIVE_CLASS, type) #define _ElfW(e,w,t) _ElfW_1 (e, w, _##t) #define _ElfW_1(e,w,t) e##w##t - +#include /* Defines __ELF_NATIVE_CLASS. */ /* Rendezvous structure used by the run-time dynamic linker to communicate details of shared object loading to the debugger. If the executable's diff --git a/sysdeps/alpha/Implies b/sysdeps/alpha/Implies index 9323409..37fee79 100644 --- a/sysdeps/alpha/Implies +++ b/sysdeps/alpha/Implies @@ -1,2 +1,3 @@ +wordsize-64 # Alpha uses IEEE 754 floating point. ieee754 diff --git a/sysdeps/i386/Implies b/sysdeps/i386/Implies index 1610bfd..d6acf04 100644 --- a/sysdeps/i386/Implies +++ b/sysdeps/i386/Implies @@ -1 +1,2 @@ +wordsize-32 ieee754 diff --git a/sysdeps/m68k/Implies b/sysdeps/m68k/Implies index a67e1c2..09dd873 100644 --- a/sysdeps/m68k/Implies +++ b/sysdeps/m68k/Implies @@ -1,2 +1,3 @@ +wordsize-32 # 68k uses IEEE 754 floating point. ieee754 diff --git a/sysdeps/mips/Implies b/sysdeps/mips/Implies index 60732ce..5aeb9ae 100644 --- a/sysdeps/mips/Implies +++ b/sysdeps/mips/Implies @@ -1,2 +1,3 @@ +wordsize-32 # MIPS uses IEEE 754 floating point. ieee754 diff --git a/sysdeps/sparc/Implies b/sysdeps/sparc/Implies index da719e1..8a2007c 100644 --- a/sysdeps/sparc/Implies +++ b/sysdeps/sparc/Implies @@ -1,2 +1,3 @@ +wordsize-32 # SPARC uses IEEE 754 floating point. ieee754 diff --git a/sysdeps/wordsize-32/elfclass.h b/sysdeps/wordsize-32/elfclass.h new file mode 100644 index 0000000..49411d6 --- /dev/null +++ b/sysdeps/wordsize-32/elfclass.h @@ -0,0 +1,5 @@ +/* This file specifies the native word size of the machine, which indicates + the ELF file class used for executables and shared objects on this + machine. */ + +#define __ELF_NATIVE_CLASS 32 diff --git a/sysdeps/wordsize-64/elfclass.h b/sysdeps/wordsize-64/elfclass.h new file mode 100644 index 0000000..ac52904 --- /dev/null +++ b/sysdeps/wordsize-64/elfclass.h @@ -0,0 +1,5 @@ +/* This file specifies the native word size of the machine, which indicates + the ELF file class used for executables and shared objects on this + machine. */ + +#define __ELF_NATIVE_CLASS 64 -- 2.7.4