diff options
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; } |