sco5.h fixes.
Robert Lipe
robertlipe@usa.net
Wed Jan 12 18:58:00 GMT 2000
I've been sitting on these for a long time. They bring OpenServer back
to the land of the living. Rather than continuing to mail them out
individually, it occurred to me to commit them. :-)
The EH_FREAME and INIT_SECTION hunks are recovery from the changes in
November or so. OpenServer's .init in COFF works very much (too much)
like .init in ELF for the old way; instead of a table of functions to
jump through, we end up with a concatentation of functions to jump to.
So we "hide" our GCC sections from the native stuff.
Also, I fixed va_arg per the suggestion from Mark and Richard.
RJL
2000-01-12 Robert Lipe <robertl@sco.com>
* i386/sco5.h (INIT_SECTION_ASM_OP_COFF): Rename section to "ctor".
(BUILD_VA_LIST_TYPE): Define.
(EH_FRAME_SECTION_ASM_OP): Explictly define to better interact with crtstuff.c.
Index: sco5.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/i386/sco5.h,v
retrieving revision 1.31
diff -u -p -r1.31 sco5.h
--- sco5.h 1999/11/28 21:44:43 1.31
+++ sco5.h 2000/01/13 02:50:51
@@ -101,7 +101,8 @@ Boston, MA 02111-1307, USA. */
#undef INIT_SECTION_ASM_OP
#define INIT_SECTION_ASM_OP_ELF "\t.section\t.init"
-#define INIT_SECTION_ASM_OP_COFF "\t.section\t.init ,\"x\""
+/* Rename these for COFF becuase crt1.o will try to run them. */
+#define INIT_SECTION_ASM_OP_COFF "\t.section\t.ctor ,\"x\""
#define INIT_SECTION_ASM_OP \
((TARGET_ELF) ? INIT_SECTION_ASM_OP_ELF : INIT_SECTION_ASM_OP_COFF)
@@ -927,6 +928,13 @@ dtors_section () \
#define MAX_OFILE_ALIGNMENT (32768*8)
+/* Define the `__builtin_va_list' type for the ABI. On OpenServer, this
+ type is `char *'. */
+#undef BUILD_VA_LIST_TYPE
+#define BUILD_VA_LIST_TYPE(VALIST) \
+ (VALIST) = build_pointer_type (char_type_node)
+
+
/*
Here comes some major hackery to get the crt stuff to compile properly.
Since we can (and do) compile for both COFF and ELF environments, we
@@ -960,7 +968,7 @@ compiler at the end of the day. Onward w
# define FINI_SECTION_ASM_OP FINI_SECTION_ASM_OP_COFF
# define DTORS_SECTION_ASM_OP DTORS_SECTION_ASM_OP_COFF
# define CTORS_SECTION_ASM_OP CTORS_SECTION_ASM_OP_COFF
-# define EH_FRAME_SECTION_ASM_OP ""
+# define EH_FRAME_SECTION_ASM_OP EH_FRAME_SECTION_ASM_OP_COFF
# define CTOR_LIST_BEGIN asm (INIT_SECTION_ASM_OP); asm ("pushl $0")
# define CTOR_LIST_END CTOR_LIST_BEGIN
# define DO_GLOBAL_CTORS_BODY \
More information about the Gcc-patches
mailing list