[PATCH] i386, a.out and _GLOBAL_OFFSET_TABLE_

Richard Henderson rth@redhat.com
Wed Sep 4 15:53:00 GMT 2002


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~



More information about the Gcc-patches mailing list