summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>1996-10-03 08:07:38 +0000
committerpeter <peter@FreeBSD.org>1996-10-03 08:07:38 +0000
commit084126c610cdae6d9938451d14c4d5871a66a946 (patch)
tree7cc7bcf0e2d250460f15e3080dce9813010816a6 /gnu
parentf9b9b4c29cecb3b26cc7489698e6c36667c695fc (diff)
downloadFreeBSD-src-084126c610cdae6d9938451d14c4d5871a66a946.zip
FreeBSD-src-084126c610cdae6d9938451d14c4d5871a66a946.tar.gz
Ugly hack alert!
libg++'s exception code causes gcc to generate (ahem!) non-conventional assembler code in -fpic mode that gas and ld choke on. Basically, gas and ld require than symbols referenced in the GOT (global offset table) are actually global (as the name implies). It attempted to work around it before, but didn't quite go far enough to prevent a core dump in ld. This hack causes GOT referenced symbols to be forced global. This probably breaks the __EXCEPTION_TABLE__ stuff in pic mode, but heck, it wasn't even possible to compile with a shared library before at all. I'm not 100% sure what the bug is. There's two possibilities: 1: gcc/cp/exception.c has to be fixed to stop doing GOT references to local symbols, or 2: as/ld/symorder/ld.so etc need to be taught about how to keep local symbols around so that they can be dealt with in GOT references. John Polstra's elfkit stuff seems to deal with this fine though, which is why I think it's a "missing feature" in our hacked gas and ld..
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/as/config/tc-i386.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnu/usr.bin/as/config/tc-i386.c b/gnu/usr.bin/as/config/tc-i386.c
index e0c71d7..8d3982e 100644
--- a/gnu/usr.bin/as/config/tc-i386.c
+++ b/gnu/usr.bin/as/config/tc-i386.c
@@ -25,7 +25,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: tc-i386.c,v 1.4 1995/05/30 04:47:29 rgrimes Exp $";
+static char rcsid[] = "$Id: tc-i386.c,v 1.5 1996/10/01 00:12:43 peter Exp $";
#endif
#include "as.h"
@@ -2082,6 +2082,7 @@ relax_addressT segment_address_in_file;
if (!extrn_bit && !S_IS_EXTERNAL(fixP->fx_addsy))
as_warn("GOT relocation burb: `%s' should be global",
S_GET_NAME(fixP->fx_addsy));
+ S_SET_EXTERNAL(fixP->fx_addsy);
extrn_bit = 1;
break;
case RELOC_GOTOFF:
OpenPOWER on IntegriCloud