http://sourceware.org/bugzilla/show_bug.cgi?id=12525
Summary: gold SEGV linking libgcc_s.so.1 on Solaris 11/x86 Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: r...@techfak.uni-bielefeld.de I've just tried to bootstrap GCC mainline with gold from either binutils 2.21 or HEAD, with no success: the first time gold is called (to link libgcc_s.so.1), it first errs parsing the command line and then SEGVs: $ gold-2.21 --eh-frame-hdr -V -G -dy -z text -m elf_i386 -Y P,/usr/ccs/lib:/usr/lib -Qy -o ./libgcc_s.so.1.tmp /usr/lib/crti.o /usr/lib/values-Xa.o /var/gcc/regression/trunk/11-gcc-gas-gold/build/./gcc/crtbegin.o -L/var/gcc/regression/trunk/11-gcc-gas-gold/build/./gcc -L. --soname=libgcc_s.so.1 --version-script=libgcc.map _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o _bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o addtf3_s.o divtf3_s.o eqtf2_s.o getf2_s.o letf2_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o tf-signs_s.o unwind-dw2_s.o unwind-dw2-fde-glibc_s.o unwind-sjlj_s.o gthr-gnat_s.o unwind-c_s.o emutls_s.o -lc /var/gcc/regression/trunk/11-gcc-gas-gold/build/./gcc/crtend.o /usr/lib/crtn.o GNU gold (GNU Binutils 2.21) 1.10 Supported targets: elf32-i386 elf32-i386-freebsd elf64-x86-64 elf64-x86-64-freebsd elf64-sparc elf32-sparc elf64-powerpcle elf64-powerpc elf32-powerpcle elf32-powerpc elf32-bigarm elf32-littlearm gold-2.21: error: cannot open text: No such file or directory Bus Error The cannot open text is obviously suspicious: -z text involves no file `text'. The SEGV (if run under gdb) happens here: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1 (LWP 1)] gold::Symbol_table::sized_write_symbol<32, false> (this=0x8046d28, sym=0x8622798, value=0, shndx=65521, binding=elfcpp::STB_GLOBAL, pool=0x8046b80, p=0xfe52e9b4 <Address 0xfe52e9b4 out of bounds>) at /vol/gnu/src/binutils/binutils-2.21/gold/symtab.cc:2865 (gdb) where #0 gold::Symbol_table::sized_write_symbol<32, false> (this=0x8046d28, sym=0x8622798, value=0, shndx=65521, binding=elfcpp::STB_GLOBAL, pool=0x8046b80, p=0xfe52e9b4 <Address 0xfe52e9b4 out of bounds>) at /vol/gnu/src/binutils/binutils-2.21/gold/symtab.cc:2865 #1 0x082dc331 in gold::Symbol_table::sized_write_globals<32, false> (this=0x8046d28, sympool=0x8046b80, dynpool=0x8046bc4, symtab_xindex=0x0, dynsym_xindex=0x0, of=0x858a758) at /vol/gnu/src/binutils/binutils-2.21/gold/symtab.cc:2832 #2 0x081fc9e8 in gold::Write_symbols_task::run (this=0x8645418) at /vol/gnu/src/binutils/binutils-2.21/gold/layout.cc:4346 #3 0x082eb52d in gold::Workqueue::find_and_run_task (this=0x804703c, thread_number=0) at /vol/gnu/src/binutils/binutils-2.21/gold/workqueue.cc:319 #4 0x082eb8e4 in gold::Workqueue::process (this=0x804703c, thread_number=0) at /vol/gnu/src/binutils/binutils-2.21/gold/workqueue.cc:495 #5 0x081303a0 in main (argc=123, argv=0x804710c) at /vol/gnu/src/binutils/binutils-2.21/gold/main.cc:247 (gdb) p sym $8 = (gold::Sized_symbol<32> *) 0x8622798 (gdb) p *sym $9 = {<gold::Symbol> = {name_ = 0x8565233 "GCC_4.5.0", version_ = 0x8565233 "GCC_4.5.0", u_ = {from_object = {object = 0x0, shndx = 0}, in_output_data = {output_data = 0x0, offset_is_from_end = false}, in_output_segment = {output_segment = 0x0, offset_base = gold::Symbol::SEGMENT_START}}, symtab_index_ = 395, dynsym_index_ = 153, got_offsets_ = {got_type_ = 4294967295, got_offset_ = 0, got_next_ = 0x0}, plt_offset_ = 4294967295, type_ = elfcpp::STT_OBJECT, binding_ = elfcpp::STB_GLOBAL, visibility_ = elfcpp::STV_DEFAULT, nonvis_ = 0, source_ = gold::Symbol::IS_CONSTANT, is_def_ = true, is_forwarder_ = false, has_alias_ = false, needs_dynsym_entry_ = true, in_reg_ = true, in_dyn_ = false, needs_dynsym_value_ = false, has_warning_ = false, is_copied_from_dynobj_ = false, is_forced_local_ = false, is_ordinary_shndx_ = false, in_real_elf_ = true, is_defined_in_discarded_section_ = false, undef_binding_set_ = false, undef_binding_weak_ = false}, value_ = 0, symsize_ = 0} Since my command of C++ is practically non-existant, I don't know how to go from here. binutils/gold were built with either g++ 4.4.2 and -g -O2 or g++ 4.5.2 and -g3 -O0, but this makes no difference. -- Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. _______________________________________________ bug-binutils mailing list bug-binutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-binutils