Bug 6647

Summary: gold crashes with swfdec-mozilla compilation
Product: binutils Reporter: Lúcio Flávio Corrêa <lucio.correa>
Component: goldAssignee: Ian Lance Taylor <ian>
Status: RESOLVED FIXED    
Severity: normal CC: bug-binutils, sanxiyn
Priority: P2    
Version: 2.18   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:
Attachments: libswfdecmozilla.ver attached

Description Lúcio Flávio Corrêa 2008-06-16 14:39:29 UTC
While trying to compile swfdec-mozilla from MASTER, gold crashes and returns an
error:

 gcc -shared  .libs/libswfdecmozilla_la-plugin.o
.libs/libswfdecmozilla_la-plugin_x11.o .libs/libswfdecmozilla_la-swfmoz_config.o
.libs/libswfdecmozilla_la-swfmoz_dialog.o
.libs/libswfdecmozilla_la-swfmoz_loader.o
.libs/libswfdecmozilla_la-swfmoz_player.o  /usr/lib/libswfdec-gtk-0.7.so
/usr/lib/libswfdec-0.7.so /usr/lib/libgtk-x11-2.0.so -loil-0.3 -lrt
/usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so
-lm /usr/lib/libpangocairo-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libcairo.so
/usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl
/usr/lib/libglib-2.0.so  -Wl,--export-dynamic -Wl,-soname
-Wl,libswfdecmozilla.so -Wl,-version-script -Wl,.libs/libswfdecmozilla.ver -o
.libs/libswfdecmozilla.so
/usr/bin/ld: internal error in script_register_vers_node, at
../../gold/script.cc:2210


I'm using gold from debian experimental: $ ld --version
GNU gold (GNU Binutils for Debian 2.18.50.20080610) 1.6
Comment 1 Lúcio Flávio Corrêa 2008-06-16 14:40:49 UTC
Ah, forgot to add compiler version:  
$gcc --version
gcc (Debian 4.3.1-2) 4.3.1
Comment 2 Ian Lance Taylor 2008-06-17 23:25:58 UTC
Could you attach the file libs/libswfdecmozilla.ver?

Thanks.
Comment 3 Lúcio Flávio Corrêa 2008-06-17 23:42:07 UTC
Created attachment 2782 [details]
libswfdecmozilla.ver attached
Comment 4 Ian Lance Taylor 2008-07-23 23:46:43 UTC
Thanks for the bug report and the version script.  I have committed a patch to
the development sources which should fix this problem.
2008-07-23  Ian Lance Taylor  <iant@google.com>

	PR 6647
	* script.cc (Version_script_info::get_versions): Don't add empty
	version tag to return value.
	(Version_script_info::get_symbol_version_helper): Change return
	type to bool.  Add pversion parameter.  Change all callers.
	(script_register_vers_node): Don't require a non-NULL tag.
	* script.h (class Version_script_info): Update declarations.
	(Version_script_info::get_symbol_version): Change return type to
	bool.  Add version parameter.  Change all callers.
	* symtab.cc (Sized_symbol::add_from_relobj): Rework version
	handling.  Handle an empty version from a version script.
	(Symbol_table::define_special_symbol): Likewise.
	* testsuite/ver_test_10.script: New file.
	* testsuite/ver_test_10.sh: New file.
	* testsuite/Makefile.am (check_SCRIPTS): Add ver_test_10.sh.
	(check_DATA): Add ver_test_10.syms.
	(ver_test_10.syms, ver_test_10.so): New target.
	* testsuite/Makefile.in: Rebuild.