This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ld --as-needed assertion fail, BFD internal error and crash


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

Attachment: pgp00000.pgp
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]