ld --as-needed assertion fail, BFD internal error and crash
Dmitry V. Levin
ldv@altlinux.org
Fri Mar 17 00:26:00 GMT 2006
On Thu, Mar 16, 2006 at 11:07:05PM +1030, Alan Modra wrote:
> PR 2434 is a problem caused by incomplete restore of symbol table state
> after deciding that an as-needed shared lib is not in fact needed. This
> patch addresses that by taking a snapshot of the sym hash table before
> loading an as-needed lib, then restoring afterwards if the lib isn't
> needed. Unfortunately, to do this we need to know the size of hash
> table entries, so I had to touch lots of files. It also can use quite
> a bit of memory. On the plus side, we do get a complete restore.
With this patch my ld --as-needed crashes even more often:
$ cat qv.cc
#include <qglobal.h>
int main(void) {return !qVersion();}
$ g++ -c -Wall -I/usr/include/qt3 qv.cc
$ ld --as-needed --eh-frame-hdr -m elf_i386 qv.o -L/usr/lib/qt3/lib
-lqt-mt -lpthread
Segmentation fault
(libqt-mt is linked with -lpthread, libpthread is not needed for qv.o)
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20060317/7ae8d8e4/attachment.sig>
More information about the Binutils
mailing list