### -*-Midas-*-
###
-### $Id: i386.m4,v 1.36 1995/02/26 03:34:36 cph Exp $
+### $Id: i386.m4,v 1.37 1995/10/01 07:19:42 cph Exp $
###
### Copyright (c) 1992-95 Massachusetts Institute of Technology
###
`define(use_external_code,`')')
ifdef(`OS2',
+ `define(`SUPPRESS_LEADING_UNDERSCORE',1)',
+ `')
+
+ifdef(`SUPPRESS_LEADING_UNDERSCORE',
`define(external_data_reference,`$1')',
`define(external_data_reference,`_$1')')
define(EDR,`external_data_reference($1)')
-ifdef(`OS2',
+ifdef(`SUPPRESS_LEADING_UNDERSCORE',
`define(external_code_reference,`$1')',
`define(external_code_reference,`_$1')')
/* -*-C-*-
System file for Linux
-$Id: linux.h,v 1.2 1995/06/29 23:50:31 cph Exp $
+$Id: linux.h,v 1.3 1995/10/01 07:19:07 cph Exp $
Copyright (c) 1995 Massachusetts Institute of Technology
#define LIB_DEBUG
#define ALTERNATE_M4 s/ultrix.m4
+
+/* The following change is necessary if ELF binaries are used.
+ Unfortunately, it is insufficient, because the Linux ELF
+ implementation also moves the data segment to 0x08000000, which
+ means that all of the pointer manipulation code must be changed.
+ This is normal for some architectures, e.g. the MIPS and HPPA, but
+ it make the binaries for Linux ELF different for the binaries for
+ all other i386 machines.
+
+ Since I don't currently know any way to adjust the mapping of the
+ data segment, if ELF is in use, I'll just force the switch that
+ causes GCC to generate a.out format instead of ELF. This is a
+ temporary patch, because one of these days a.out won't be
+ supported, but hopefully by then we'll know how to fix this
+ correctly. */
+#if 0
+#ifdef __ELF__
+#define M4_SWITCH_SYSTEM -P "define(SUPPRESS_LEADING_UNDERSCORE,1)"
+#else
+#define M4_SWITCH_SYSTEM
+#endif
+#endif
+
+#ifdef __ELF__
+#define C_SWITCH_SYSTEM -b i486-linuxaout
+#define LD_SWITCH_SYSTEM -b i486-linuxaout
+#else
+#define C_SWITCH_SYSTEM
+#define LD_SWITCH_SYSTEM
+#endif