Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys Use <machine/elf_machdep.h> to override Elf64_Word and E...



details:   https://anonhg.NetBSD.org/src/rev/1ffd9da5ebb4
branches:  trunk
changeset: 516833:1ffd9da5ebb4
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Oct 31 17:44:42 2001 +0000

description:
Use <machine/elf_machdep.h> to override Elf64_Word and Elf64_Sword
on the Alpha (which uses a non-standard definitions for historical
reasons), rather than #ifdef __alpha__ (which is not cross-tool safe).

diffstat:

 sys/arch/alpha/include/elf_machdep.h |  11 ++++++++++-
 sys/sys/exec_elf.h                   |  13 +++++--------
 2 files changed, 15 insertions(+), 9 deletions(-)

diffs (49 lines):

diff -r 7c8c947d4c88 -r 1ffd9da5ebb4 sys/arch/alpha/include/elf_machdep.h
--- a/sys/arch/alpha/include/elf_machdep.h      Wed Oct 31 17:35:06 2001 +0000
+++ b/sys/arch/alpha/include/elf_machdep.h      Wed Oct 31 17:44:42 2001 +0000
@@ -1,4 +1,13 @@
-/* $NetBSD: elf_machdep.h,v 1.6 2000/04/02 15:35:49 minoura Exp $ */
+/* $NetBSD: elf_machdep.h,v 1.7 2001/10/31 17:44:43 thorpej Exp $ */
+
+/*
+ * Alpha ELF uses different (non-standard) definitions of Elf64_Sword
+ * and Elf64_Word.
+ */
+typedef        __int64_t       Elf64_Sword;
+#define        ELF64_FSZ_SWORD 8
+typedef        __uint64_t      Elf64_Word;
+#define        ELF64_FSZ_WORD  8
 
 #define        ELF32_MACHDEP_ENDIANNESS        XXX     /* break compilation */
 #define        ELF32_MACHDEP_ID_CASES                                          \
diff -r 7c8c947d4c88 -r 1ffd9da5ebb4 sys/sys/exec_elf.h
--- a/sys/sys/exec_elf.h        Wed Oct 31 17:35:06 2001 +0000
+++ b/sys/sys/exec_elf.h        Wed Oct 31 17:44:42 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf.h,v 1.56 2001/10/31 17:35:06 thorpej Exp $    */
+/*     $NetBSD: exec_elf.h,v 1.57 2001/10/31 17:44:42 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1994 The NetBSD Foundation, Inc.
@@ -71,17 +71,14 @@
 typedef        __int32_t       Elf64_Shalf;
 #define        ELF64_FSZ_SHALF 4
 
-#ifdef __alpha__
-typedef        __int64_t       Elf64_Sword;
-#define        ELF64_FSZ_SWORD 8
-typedef        __uint64_t      Elf64_Word;
-#define        ELF64_FSZ_WORD  8
-#else
+#ifndef ELF64_FSZ_SWORD
 typedef        __int32_t       Elf64_Sword;
 #define        ELF64_FSZ_SWORD 4
+#endif /* ELF64_FSZ_SWORD */
+#ifndef ELF64_FSZ_WORD
 typedef        __uint32_t      Elf64_Word;
 #define        ELF64_FSZ_WORD  4
-#endif /* __alpha__ */
+#endif /* ELF64_FSZ_WORD */
 
 typedef        __int64_t       Elf64_Sxword;
 #define        ELF64_FSZ_XWORD 8



Home | Main Index | Thread Index | Old Index