summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-07 05:43:59 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-02-07 05:43:59 +0000
commitf5a470d6034e184af6eebfa6994412db7c2f8bbe (patch)
tree4bf5c9d4d1cf5b527a7d6ac3c9181bdabb4f43ae
parentd5a5fac5f9988993bd2198e7db13016c6bf77238 (diff)
downloadppe42-gcc-f5a470d6034e184af6eebfa6994412db7c2f8bbe.tar.gz
ppe42-gcc-f5a470d6034e184af6eebfa6994412db7c2f8bbe.zip
* config/elfos.h (INT_ASM_OP): Don't define it if it's already
defined. * config/sh/sh.h (INT_ASM_OP, ASM_OUTPUT_CONSTRUCTOR, ASM_OUTPUT_DESTRUCTOR): Copy definitions from config/elfos.h. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39510 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/config/elfos.h15
-rw-r--r--gcc/config/sh/sh.h31
3 files changed, 45 insertions, 8 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9c1596c6ea8..e3bb18f8d90 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/elfos.h (INT_ASM_OP): Don't define it if it's already
+ defined.
+ * config/sh/sh.h (INT_ASM_OP, ASM_OUTPUT_CONSTRUCTOR,
+ ASM_OUTPUT_DESTRUCTOR): Copy definitions from config/elfos.h.
+
2001-02-06 Chandrakala Chavva <cchavva@redhat.com>
* final.c: Revert back my previous changes.
diff --git a/gcc/config/elfos.h b/gcc/config/elfos.h
index 27ee2f24df6..7d9ac7640a5 100644
--- a/gcc/config/elfos.h
+++ b/gcc/config/elfos.h
@@ -1,6 +1,7 @@
/* elfos.h -- operating system specific defines to be used when
targeting GCC for some generic ELF system
- Copyright (C) 1991, 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994, 1995, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Based on svr4.h contributed by Ron Guilmette (rfg@netcom.com).
This file is part of GNU CC.
@@ -232,11 +233,17 @@ Boston, MA 02111-1307, USA. */
} \
while (0)
-/* This is the pseudo-op used to generate a 32-bit word of data with a
- specific value in some section. This is the same for all known svr4
- assemblers. */
+/* This is the pseudo-op used to generate a reference to a specific
+ symbol in some section. It is only used in machine-specific
+ configuration files, typically only in ASM_OUTPUT_CONSTRUCTOR and
+ ASM_OUTPUT_DESTRUCTOR. This is the same for all known svr4
+ assemblers, except those in targets that don't use 32-bit pointers.
+ Those should override INT_ASM_OP. Yes, the name of the macro is
+ misleading. */
+#ifndef INT_ASM_OP
#define INT_ASM_OP "\t.long\t"
+#endif
/* This is the pseudo-op used to generate a contiguous sequence of byte
values from a double-quoted string WITHOUT HAVING A TERMINATING NUL
diff --git a/gcc/config/sh/sh.h b/gcc/config/sh/sh.h
index ebc98b3532f..01473bd3a52 100644
--- a/gcc/config/sh/sh.h
+++ b/gcc/config/sh/sh.h
@@ -1931,11 +1931,34 @@ dtors_section() \
#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME, RELOC) \
do { fprintf (FILE, ".section\t%s\n", NAME); } while (0)
-#define ASM_OUTPUT_CONSTRUCTOR(FILE,NAME) \
- do { ctors_section(); asm_fprintf((FILE),"\t.long\t%U%s\n", (NAME)); } while (0)
+/* This is the pseudo-op used to generate a reference to a specific
+ symbol in some section. */
-#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
- do { dtors_section(); asm_fprintf((FILE),"\t.long\t%U%s\n", (NAME)); } while (0)
+#define INT_ASM_OP "\t.long\t"
+
+/* A C statement (sans semicolon) to output an
+ element in the table of global constructors. */
+#define ASM_OUTPUT_CONSTRUCTOR(FILE, NAME) \
+ do \
+ { \
+ ctors_section (); \
+ fprintf (FILE, "%s", INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } \
+ while (0)
+
+/* A C statement (sans semicolon) to output an
+ element in the table of global destructors. */
+#define ASM_OUTPUT_DESTRUCTOR(FILE,NAME) \
+ do \
+ { \
+ dtors_section (); \
+ fprintf (FILE, "%s", INT_ASM_OP); \
+ assemble_name (FILE, NAME); \
+ fprintf (FILE, "\n"); \
+ } \
+ while (0)
#undef DO_GLOBAL_CTORS_BODY
OpenPOWER on IntegriCloud