summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-06-10 13:03:12 +0000
committerRoland McGrath <roland@gnu.org>1996-06-10 13:03:12 +0000
commit567c63af19d2f03836d14856596b4ae6259c03a8 (patch)
tree1be11c1b7255851437f33e4bf8bd9f91b0f0c02a /elf
parent266180eb985e14fa9f77cfd3b41e9211e9986162 (diff)
* 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.
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile2
-rw-r--r--elf/link.h8
2 files changed, 4 insertions, 6 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 34be12e769..06aeb7590a 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 f7bca97e80..6d284cbbde 100644
--- a/elf/link.h
+++ b/elf/link.h
@@ -25,15 +25,13 @@ Cambridge, MA 02139, USA. */
#include <elf.h>
-#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 <elfclass.h> /* 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