using the attached .o linux x86-64 object and put into an archive, a simple gold
invocation to create a shared library causes an internal error
this is with current cvs (~ Mon May 11 21:23:03 EDT 2009)
$ rm -f libfoo.a
$ ar rc libfoo.a control.o
$ ./gold/ld-new -shared -o libfoo.so --whole-archive libfoo.a
./gold/ld-new: internal error in make_view, at ../../gold/fileread.cc:356
Created attachment 3932 [details]
Subject: Bug 10147
Module name: src
Changes by: email@example.com 2009-06-23 07:19:35
gold : ChangeLog object.cc
* object.cc (Object::section_contents): Don't try to get a view if
the section has length zero.
(Object::handle_gnu_warning_section): If the section is empty, use
the name of the section as the warning.
Thanks for the bug report. The problem was an unexpected empty .gnu.warning
section. I committed a patch to fix this in the development sources.
The link still fails, but now it gets a plausible error message:
ld: error: symbol snd_ctl_elem_info_get_dimensions has undefined version ALSA_0.9.3
This implies that you need to provide a version script if you want to create a
this was a reduced test case. the original one was using a version script.
perhaps i reduced it too much and instead triggered a different bug ? ;) i was
going by the internal error message being the same.
i686-pc-linux-gnu-gcc -shared .libs/conf.o .libs/confmisc.o .libs/input.o
.libs/output.o .libs/async.o .libs/error.o .libs/dlmisc.o .libs/socket.o
.libs/shmarea.o .libs/userfile.o .libs/names.o -Wl,--whole-archive
control/.libs/libcontrol.a mixer/.libs/libmixer.a pcm/.libs/libpcm.a
timer/.libs/libtimer.a rawmidi/.libs/librawmidi.a hwdep/.libs/libhwdep.a
seq/.libs/libseq.a compat/.libs/libcompat.a -Wl,--no-whole-archive
-Wl,--as-needed -lm -ldl -lpthread -lrt -march=native -Wl,-O1
-Wl,--version-script=Versions -Wl,-soname -Wl,libasound.so.2 -o
Reopening since not fixed.
do you need me to put together a new test case ? you should be able to
reproduce by downloading the latest alsa-lib and a normal configure && make ...
I downloaded alsa-lib 1.0.20 and built it with the current development version
of gold without any trouble.
So, I guess I do need you to give me a test case. It is also conceivable that
the problem was fixed by the burst of patches I committed in the last couple of
binutils-220.127.116.11.14 seems to work for people, thanks !