aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386.c8
-rw-r--r--gcc/config/i386/i386.h2
-rw-r--r--gcc/config/i386/netbsd.h5
4 files changed, 19 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9ea0e66..86f3fb2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -142,6 +142,14 @@ Thu Sep 5 16:27:47 2002 J"orn Rennecke <joern.rennecke@superh.com>
* config/h8300/h8300.c (asm_file_start): Add a missing
semicolon.
+2002-09-04 Krister Walfridsson <cato@df.lth.se>
+
+ * config/i386/i386.h (GOT_SYMBOL_NAME): Define.
+ * config/i386/i386.c (output_set_got): Use GOT_SYMBOL_NAME.
+ (ix86_output_addr_diff_elt) Likewise.
+ (x86_output_mi_thunk) Likewise.
+ * config/i386/netbsd.h (GOT_SYMBOL_NAME): Redefine.
+
2002-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* frv.c (frv_encode_section_info): Fix error in last change.
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 4e0da60..a000bae 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -3963,7 +3963,7 @@ output_set_got (dest)
rtx xops[3];
xops[0] = dest;
- xops[1] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
+ xops[1] = gen_rtx_SYMBOL_REF (Pmode, GOT_SYMBOL_NAME);
if (! TARGET_DEEP_BRANCH_PREDICTION || !flag_pic)
{
@@ -7335,8 +7335,8 @@ ix86_output_addr_diff_elt (file, value, rel)
machopic_function_base_name () + 1);
#endif
else
- asm_fprintf (file, "%s%U_GLOBAL_OFFSET_TABLE_+[.-%s%d]\n",
- ASM_LONG, LPREFIX, value);
+ asm_fprintf (file, "%s%U%s+[.-%s%d]\n",
+ ASM_LONG, GOT_SYMBOL_NAME, LPREFIX, value);
}
/* Generate either "mov $0, reg" or "xor reg, reg", as appropriate
@@ -13800,7 +13800,7 @@ x86_output_mi_thunk (file, delta, function)
{
xops[0] = pic_offset_table_rtx;
xops[1] = gen_label_rtx ();
- xops[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
+ xops[2] = gen_rtx_SYMBOL_REF (Pmode, GOT_SYMBOL_NAME);
if (ix86_regparm > 2)
abort ();
diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index d6c779d..1c75c20 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -1105,6 +1105,8 @@ do { \
: reload_completed ? REGNO (pic_offset_table_rtx) \
: REAL_PIC_OFFSET_TABLE_REGNUM)
+#define GOT_SYMBOL_NAME "_GLOBAL_OFFSET_TABLE_"
+
/* Register in which address to store a structure value
arrives in the function. On the 386, the prologue
copies this from the stack to register %eax. */
diff --git a/gcc/config/i386/netbsd.h b/gcc/config/i386/netbsd.h
index 332e70f..ab0af77 100644
--- a/gcc/config/i386/netbsd.h
+++ b/gcc/config/i386/netbsd.h
@@ -62,3 +62,8 @@
/* Until they use ELF or something that handles dwarf2 unwinds
and initialization stuff better. */
#define DWARF2_UNWIND_INFO 0
+
+/* Redefine this so that it becomes "_GLOBAL_OFFSET_TABLE_" when the label
+ prefix is added. */
+#undef GOT_SYMBOL_NAME
+#define GOT_SYMBOL_NAME "GLOBAL_OFFSET_TABLE_"