diff options
author | Marc Espie <espie@cvs.openbsd.org> | 1999-04-30 23:07:42 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 1999-04-30 23:07:42 +0000 |
commit | 617caab60085feb9989ac5fb2fd45d382a7fe0ac (patch) | |
tree | 70eb4218813317809d14d0c0d7de2393afc71a27 /gnu | |
parent | 2a4385068fdf65e236d49492426223f84c8d2ac7 (diff) |
GOT name is __GLOBAL_OFFSET_TABLE_ on i386 a.out.
gcc 2.8.1 emits _GLOBAL_OFFSET_TABLE_ instead, so gas has to take
care of that...
This reverts to a previous gas state, but with comments much clearer,
and a real clue about what's going on.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/usr.bin/gas/config/tc-i386.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/gnu/usr.bin/gas/config/tc-i386.c b/gnu/usr.bin/gas/config/tc-i386.c index 0b3aece7640..431350284c6 100644 --- a/gnu/usr.bin/gas/config/tc-i386.c +++ b/gnu/usr.bin/gas/config/tc-i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tc-i386.c,v 1.5 1999/01/23 00:18:15 espie Exp $ */ +/* $OpenBSD: tc-i386.c,v 1.6 1999/04/30 23:07:41 espie Exp $ */ /* i386.c -- Assemble code for the Intel 80386 Copyright (C) 1989, 1991, 1992 Free Software Foundation. @@ -27,7 +27,7 @@ */ #ifndef lint -static char rcsid[] = "$OpenBSD: tc-i386.c,v 1.5 1999/01/23 00:18:15 espie Exp $"; +static char rcsid[] = "$OpenBSD: tc-i386.c,v 1.6 1999/04/30 23:07:41 espie Exp $"; #endif #include "as.h" @@ -35,11 +35,8 @@ static char rcsid[] = "$OpenBSD: tc-i386.c,v 1.5 1999/01/23 00:18:15 espie Exp $ #include "obstack.h" #include "opcode/i386.h" -#ifdef KLUDGE +/* real name for the assembler, translate from C _GLOBAL_OFFSET_TABLE_ */ #define GLOBAL_OFFSET_TABLE_NAME "__GLOBAL_OFFSET_TABLE_" -#else -#define GLOBAL_OFFSET_TABLE_NAME "_GLOBAL_OFFSET_TABLE_" -#endif /* one more argument for fix_new */ #ifdef PIC @@ -2259,16 +2256,18 @@ symbolS * char *name; { #ifdef PIC -#ifdef KLUDGE - /* HACK: - * Sun's ld expects __GLOBAL_OFFSET_TABLE_, - * gcc generates _GLOBAL_OFFSET_TABLE_ - * should probably fix ld - new SVR4 style?? + /* gcc bug work-around: + * old versions of gcc don't heed YES_UNDERSCORES, + * and always generate _GLOBAL_OFFSET_TABLE_. + * On OpenBSD, this is a bug, as this collides with + * the user namespace. + * + * This code will no longer be needed once the switch to a recent + * egcs is complete. */ if (*name == '_' && *(name+1) == 'G' && strcmp(name, "_GLOBAL_OFFSET_TABLE_") == 0) - return symbol_find("__GLOBAL_OFFSET_TABLE_"); -#endif + return symbol_find(GLOBAL_OFFSET_TABLE_NAME); #endif return 0; } |