This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] i386, a.out and _GLOBAL_OFFSET_TABLE_
- From: Richard Henderson <rth at redhat dot com>
- To: Krister Walfridsson <cato at df dot lth dot se>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 4 Sep 2002 15:52:55 -0700
- Subject: Re: [PATCH] i386, a.out and _GLOBAL_OFFSET_TABLE_
- References: <Pine.GSO.4.44.0209042326240.21056-100000@igloo.df.lth.se>
On Wed, Sep 04, 2002 at 11:28:58PM +0200, Krister Walfridsson wrote:
> PIC code does not work on a.out i386--netbsd because the GOT symbol name is
> emitted as "__GLOBAL_OFFSET_TABLE_" instead of the expected
> "_GLOBAL_OFFSET_TABLE_". This is fixed by the patch below...
For the record, this was a bad decision, because it puts
the symbol in the user's name space. I suppose it doesn't
matter any more with the move to elf...
> * 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.
Ok.
r~