From 5fc0e5dfb43ae87c4afc11879efedc9845cae6a9 Mon Sep 17 00:00:00 2001 From: Krister Walfridsson Date: Fri, 6 Sep 2002 22:34:41 +0200 Subject: [PATCH] i386.h (GOT_SYMBOL_NAME): Define. * 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. From-SVN: r56904 --- gcc/ChangeLog | 8 ++++++++ gcc/config/i386/i386.c | 8 ++++---- gcc/config/i386/i386.h | 2 ++ gcc/config/i386/netbsd.h | 5 +++++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9ea0e662f54..86f3fb22569 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -142,6 +142,14 @@ Thu Sep 5 16:27:47 2002 J"orn Rennecke * config/h8300/h8300.c (asm_file_start): Add a missing semicolon. +2002-09-04 Krister Walfridsson + + * 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 * 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 4e0da606f92..a000bae754c 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 d6c779dffcf..1c75c20591f 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 332e70f1f42..ab0af773bd1 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_" -- 2.30.2