summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-08-09 22:00:35 +0000
committerRichard M. Stallman <rms@gnu.org>1996-08-09 22:00:35 +0000
commit821f376d2ceba5470baa00ef2ee970d298b01b32 (patch)
tree328a563ac8a3c37fffe2d00908bd9ccb3750716c
parent513dea0acb5ac0b199581b814643a5a3b9460951 (diff)
downloademacs-821f376d2ceba5470baa00ef2ee970d298b01b32.tar.gz
[__ELF__ && __GNUC__] (C_SWITCH_MACHINE): Add -fno-common.
(TEXT_START, DATA_START, DATA_SEG_BITS, UNEXEC): Define only if __ELF__ is not defined. (LINUX_SBRK_BUG): Define only if LINUX and __GNU_LIBRARY__ < 6. (NO_TERMIO): Always define this. No Alpha system should need termio. (COFF, DATA_END): Define only if __ELF__ is not defined.
-rw-r--r--src/m/alpha.h41
1 files changed, 30 insertions, 11 deletions
diff --git a/src/m/alpha.h b/src/m/alpha.h
index 606b7aab469..09b51fd6993 100644
--- a/src/m/alpha.h
+++ b/src/m/alpha.h
@@ -139,6 +139,21 @@ NOTE-END
/* #define NO_SOCK_SIGIO */
+#ifdef __ELF__
+/* With ELF, make sure that all common symbols get allocated to in the
+ data section. Otherwise, the dump of temacs may miss variables in
+ the shared library that have been initialized. For example, with
+ GNU libc, __malloc_initialized would normally be resolved to the
+ shared library's .bss section, which is fatal. */
+# ifdef __GNUC__
+# define C_SWITCH_MACHINE -fno-common
+# else
+# error What gives? Fix me if DEC Unix supports ELF now.
+# endif
+#endif
+
+#ifndef __ELF__
+
/* Describe layout of the address space in an executing process. */
#define TEXT_START 0x120000000
@@ -149,6 +164,12 @@ NOTE-END
#define DATA_SEG_BITS 0x140000000
+/* The program to be used for unexec. */
+
+#define UNEXEC unexalpha.o
+
+#endif /* notdef __ELF__ */
+
#ifdef OSF1
#define ORDINARY_LINK
@@ -175,15 +196,11 @@ NOTE-END
#define START_FILES pre-crt0.o
#endif
-#ifdef LINUX
+#if defined (LINUX) && __GNU_LIBRARY__ - 0 < 6
/* This controls a conditional in main. */
#define LINUX_SBRK_BUG
#endif
-/* The program to be used for unexec. */
-
-#define UNEXEC unexalpha.o
-
#define PNTR_COMPARISON_TYPE unsigned long
@@ -273,12 +290,14 @@ extern void r_alloc_free ();
while (0)
#endif
-#ifdef linux
-#define COFF
-/* Linux/Alpha doesn't like it if termio.h and termios.h get included
- simultaneously. */
+/* On the Alpha it's best to avoid including TERMIO since struct
+ termio and struct termios are mutually incompatible. */
#define NO_TERMIO
-#define TEXT_END ({ extern int _etext; &_etext; })
-#define DATA_END ({ extern int _EDATA; &_EDATA; })
+#ifdef LINUX
+# define TEXT_END ({ extern int _etext; &_etext; })
+# ifndef __ELF__
+# define COFF
+# define DATA_END ({ extern int _EDATA; &_EDATA; })
+# endif /* notdef __ELF__ */
#endif