Date: Thu, 03 Oct 1996 09:05:56 -0700 From: John Polstra <jdp@polstra.com> To: Peter Wemm <peter@freefall.freebsd.org> Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-gnu@freefall.freebsd.org Subject: Re: cvs commit: src/gnu/usr.bin/as/config tc-i386.c Message-ID: <199610031605.JAA17639@austin.polstra.com> In-Reply-To: <199610030807.BAA11259@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
> 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 Yes. That is the bug. I made a patch for gcc-2.7.2 some time ago that fixed this problem. I'll send it to you separately. > 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. No! Ick! Gross! > 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.. I think I probably included my patch in Elfkit. That's why it works OK. Warning! Even after fixing the GOT/GOTOFF problem, there is still a bug in the exception code from gcc-2.7.2 (and probably 2.7.2.1) for -fpic. I will try to find the details again from my mail archives. As I recall, it was making a PIC call without having set up %ebx properly. I didn't come up with a solution for that one. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610031605.JAA17639>