aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1992-10-06 00:26:09 +0000
committerRichard Stallman <rms@gnu.org>1992-10-06 00:26:09 +0000
commit3041f3be0262e4f34faf464c0de531d06428aafa (patch)
tree3a090b59986d946d22ade8bbeb427854f4787796
parenteef80fde878cdfdd60a2157a6c336dfe5513a1cc (diff)
downloadgcc-3041f3be0262e4f34faf464c0de531d06428aafa.zip
gcc-3041f3be0262e4f34faf464c0de531d06428aafa.tar.gz
gcc-3041f3be0262e4f34faf464c0de531d06428aafa.tar.bz2
(NO_DOLLAR_IN_LABEL): Undef because gas understands dollars in labels and gdb expects them if configured for gas.
(NO_DOLLAR_IN_LABEL): Undef because gas understands dollars in labels and gdb expects them if configured for gas. (STARTFILE_SPEC): Include huge.o to be compatible with native cc. (ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): (CTOR_LISTS_DEFINED_EXTERNALLY, DO_GLOBAL_DTORS_BODY): (STARTFILE_SPEC): Conditionally redefine for a collectless version of gcc if USE_COLLECT2 is not defined. From-SVN: r2335
-rw-r--r--gcc/config/m68k/dpx2g.h45
1 files changed, 43 insertions, 2 deletions
diff --git a/gcc/config/m68k/dpx2g.h b/gcc/config/m68k/dpx2g.h
index 40bc58e..5e80124 100644
--- a/gcc/config/m68k/dpx2g.h
+++ b/gcc/config/m68k/dpx2g.h
@@ -5,6 +5,44 @@
#define USE_GAS
#include "dpx2.h"
+#ifndef USE_COLLECT2
+/* We use set vectors for the constructors/destructors. */
+
+#undef ASM_OUTPUT_CONSTRUCTOR
+#undef ASM_OUTPUT_DESTRUCTOR
+
+/* Although the gas we use can create .ctor and .dtor sections from N_SETT
+ stabs, it does not support section directives, so we need to have the loader
+ define the lists.
+ */
+#define CTOR_LISTS_DEFINED_EXTERNALLY
+
+/* similar to default, but allows for the table defined by ld with gcc.ifile.
+ nptrs is always 0. So we need to instead check that __DTOR_LIST__[1] != 0.
+ The old check is left in so that the same macro can be used if and when
+ a future version of gas does support section directives. */
+
+#define DO_GLOBAL_DTORS_BODY {int nptrs = *(int *)__DTOR_LIST__; int i; \
+ if (nptrs == -1 || (__DTOR_LIST__[0] == 0 && __DTOR_LIST__[1] != 0)) \
+ for (nptrs = 0; __DTOR_LIST__[nptrs + 1] != 0; nptrs++); \
+ for (i = nptrs; i >= 1; i--) \
+ __DTOR_LIST__[i] (); }
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{!r:gcc.ifile%s}\
+ %{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\
+ huge.o%s"
+
+#else /* !USE_COLLECT2 */
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC \
+ "%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}\
+ huge.o%s"
+
+#endif /* !USE_COLLECT2 */
+
/* GAS want's DBX debugging information. */
#undef SDB_DEBUGGING_INFO
@@ -17,11 +55,14 @@
*/
#undef EXTRA_SECTION_FUNCTIONS
#undef EXTRA_SECTIONS
-
+/* Gas understands dollars in labels. */
+#undef NO_DOLLAR_IN_LABEL
/* GAS does not understand .ident so don't output anything for #ident. */
#undef ASM_OUTPUT_IDENT
-/* Put const's in the text section. */
+/*
+ * put const's in the text section
+ */
#define const_section() text_section()
#define fini_section() while (0)