[Bug gold/12771] New: internal error in value_from_output_section, at ../../gold/reloc.cc:1508 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=12771 Summary: internal error in value_from_output_section, at ../../gold/reloc.cc:1508 on armel Product: binutils Version: 2.22 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: jrnie...@gmail.com CC: timo.lindf...@iki.fi Created attachment 5730 -- http://sourceware.org/bugzilla/attachment.cgi?id=5730 testcase Hi, Timo Lindfors found that running ld.gold allcodecs.o with this object file on his sheevaplug produces ld.gold: internal error in value_from_output_section, at ../../gold/reloc.cc:1508 and an exit status of 1. It's reproducible with real hardware but not with qemu (on qemu one instead gets the expected bunch of error: undefined reference errors for objects not passed on the command line). Tests so far have been with 2.21.51.20110421-4 from Debian sid but presumably it shouldn't be hard to check with the latest from git://sources.redhat.com/git/binutils.git if that's useful. http://bugs.debian.org/616715 has details. Any hints for tracking this down? Thanks for gold :) Jonathan -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/11259] executables linked with gold segfault
http://sourceware.org/bugzilla/show_bug.cgi?id=11259 Jonathan Nieder jrnieder at gmail dot com changed: What|Removed |Added CC||jrnieder at gmail dot com --- Comment #1 from Jonathan Nieder jrnieder at gmail dot com 2011-06-05 22:10:36 UTC --- (In reply to comment #0) I'm using Ubuntu 9.10 for ARM on my (OMAP3) Beagleboard. When I install gold as /usr/bin/ld and use it to recompile / relink gold, it segfaults. Other executables linked with gold also segfault. Can you still reproduce this? If so, could you get an example backtrace? -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/12771] internal error in value_from_output_section, at ../../gold/reloc.cc:1508 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=12771 --- Comment #5 from Jonathan Nieder jrnieder at gmail dot com 2011-06-17 21:10:19 UTC --- Hi Ian, ian at airs dot com wrote: It sounds like you are saying that gold, compiled and running on an ARM system, crashes, whereas gold, compiled and running on an ARM simulator, does not crash. For completeness, I should mention that gold, compiled on an ARM system and running on an ARM simulator, also does not crash. -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/12771] internal error in value_from_output_section, at ../../gold/reloc.cc:1508 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=12771 --- Comment #7 from Jonathan Nieder jrnieder at gmail dot com 2011-06-29 15:35:40 UTC --- (In reply to comment #6) This seems far more likely to be a problem in the tools used to build gold, rather than a problem in gold itself. I'm going to close this out. Please reopen if you have some reason to believe that there is a problem in gold itself. Just for completeness: did you test on a non-emulated ARM system? The triggered failed assertion says bool found = object-merge_map()-get_output_offset(NULL, input_shndx, input_offset, output_offset); // If this assertion fails, it means that some relocation was // against a portion of an input merge section which we didn't map // to the output file and we didn't explicitly discard. We should // always map all portions of input merge sections. gold_assert(found); That doesn't immediately scream code generation bug to me --- it could be a use of uninitialized memory or some other portability problem. If I wanted to pin it on something other than gold this early, I'd be more likely to blame libstdc++ than the code generation, but it's hard to learn anything without hardware to investigate on. -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] New: internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 Bug #: 13362 Summary: internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel Product: binutils Version: 2.23 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: jrnie...@gmail.com CC: ccout...@google.com, dougk...@google.com Classification: Unclassified Created attachment 6042 -- http://sourceware.org/bugzilla/attachment.cgi?id=6042 kernel module generated with systemtap 1.6-1 Hi, Timo Lindfors found that running ld.gold -r -o typequery_kmod_8.ko typequery_kmod_8.o with this object file on his openmoko and on his marvell development board (which are ARMv4 and v5, respectively) produces ld.gold: internal error in value_from_output_section, at ../../gold/reloc.cc:1549 Just like PR12771, it's reproducible with real hardware but not on qemu (since qemu doesn't emulate misaligned accesses with a trap or rotation). Timo checked that the testcase from PR12771 still isn't causing trouble, so this is a distinct bug. Tests so far have been with version 2.21.90.20111025-1 from Debian sid. After running echo 5 /proc/cpu/alignment, it dies with SIGBUS instead. So we can get a backtrace: #0 rel32 at gold/i386.cc:3632 #1 rel32 at gold/reloc.h:559 #2 gold::relocate_for_relocatable32, false, 9 at gold/target-reloc.h:784 #3 gold::Sized_relobj_file32, false::do_relocate_sections at gold/reloc.cc:1027 #4 (anonymous namespace)::Arm_relobjfalse::do_relocate_sections at gold/arm.cc:6452 #5 relocate_sections at gold/object.h:2337 #6 gold::Sized_relobj_file32, false::do_relocate at gold/reloc.cc:670 #7 relocate at gold/object.h:1074 #8 gold::Relocate_task::run at gold/reloc.cc:239 #9 gold::Workqueue::find_and_run_task at gold/workqueue.cc:319 Details, including a fuller backtrace, are at http://bugs.debian.org/647049 -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 Jonathan Nieder jrnieder at gmail dot com changed: What|Removed |Added CC||timo.lindfors at iki dot fi -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 Jonathan Nieder jrnieder at gmail dot com changed: What|Removed |Added Version|2.23 (HEAD) |2.22 -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 --- Comment #2 from Jonathan Nieder jrnieder at gmail dot com 2011-10-31 06:30:55 UTC --- ian at airs dot com wrote: I believe this is already fixed on mainline and in the upcoming 2.22 release. To be clear, as mentioned above, Timo used the testcase from PR12771 to confirm that the fix to PR12771 is already applied. Timo was testing using a recent snapshot of binutils-2_22-branch. This might or might not be fixed on mainline (I don't have the hardware to check), but I don't see how it can be a duplicate of PR12771. -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 Jonathan Nieder jrnieder at gmail dot com changed: What|Removed |Added Status|RESOLVED|REOPENED Version|2.22|2.23 (HEAD) Resolution|DUPLICATE | --- Comment #3 from Jonathan Nieder jrnieder at gmail dot com 2011-10-31 19:51:09 UTC --- Hi again, Quick update now that I have (remote) access to some hardware to test on (thanks, Timo!): Testing yesterday's HEAD (commit 5625fcaf, daily update, 2011-10-30), I get the following result: $ make check [...] (cd gcctestdir2 ln -s ../ld1 ld) g++ -W -Wall-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=ld2 -g -O2 -Bgcctestdir2/ -o ld2 main.o i386.o x86_64.o sparc.o powerpc.o arm.o arm-reloc-property.o libgold.a ../libiberty/libiberty.a -lz gcctestdir1/ld -o libgold-1-r.o -r --whole-archive libgold.a make[4]: *** [libgold-1-r.o] Bus error make[4]: *** Deleting file `libgold-1-r.o' make[4]: Leaving directory `/home/jrn/src/binutils/gold' make[3]: *** [check-am] Error 2 make[3]: Leaving directory `/home/jrn/src/binutils/gold' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/home/jrn/src/binutils/gold' make[1]: *** [check-gold] Error 2 make[1]: Leaving directory `/home/jrn/src/binutils' make: *** [do-check] Error 2 So I'm taking the liberty of reopening the bug. If I am missing something, please feel free to let me know. Thanks for gold, of course. -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 --- Comment #7 from Jonathan Nieder jrnieder at gmail dot com 2011-11-10 03:40:36 UTC --- Hi Doug, cvs-commit at gcc dot gnu.org wrote: Modified files: gold : ChangeLog arm.cc reloc.h target-reloc.h gold/testsuite : Makefile.am Makefile.in arm_unaligned_reloc.sh FWIW, I tried applying this patch on top of e0e67cec (daily update, 2011-11-09). The result: | $ make check [...] | g++ -W -Wall-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -Bgcctestdir/ -o tls_test tls_test.o tls_test_file2.o tls_test_main.o tls_test_c.o -lpthread -lz | collect2: ld terminated with signal 7 [Bus error] | make[3]: *** [tls_test] Error 1 | make[3]: Leaving directory `/home/jrn/src/binutils/gold/testsuite' which looks like progress. This is on a Marvell DB-78x00-BP Development Board (v5l). Thanks and hope that helps, Jonathan -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 --- Comment #8 from Jonathan Nieder jrnieder at gmail dot com 2011-11-10 04:09:30 UTC --- Jonathan Nieder wrote: | $ make check [...] | g++ -W -Wall-Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -g -O2 -Bgcctestdir/ -o tls_test tls_test.o tls_test_file2.o tls_test_main.o tls_test_c.o -lpthread -lz | collect2: ld terminated with signal 7 [Bus error] More precisely: | Program received signal SIGBUS, Bus error. | 0x000841ac in rel32 (value=32, view=0x2eb938 0.,) at reloc.h:333 | 333 elfcpp::Swapvalsize, big_endian::writeval(wv, x + value); Backtrace: #0 rel32 at reloc.h:333 #1 rel32 at reloc.h:569 #2 relocate_tls at arm.cc:9376 #3 (anonymous namespace)::Target_armfalse::Relocate::relocate at arm.cc:9256 #4 relocate_section32, false, {anonymous}::Target_armfalse, 9, {anonymous}::Target_armfalse::Relocate at target-reloc.h:385 #5 (anonymous namespace)::Target_armfalse::relocate_section at arm.cc:9478 #6 gold::Sized_relobj_file32, false::do_relocate_sections at reloc.cc:1013 #7 (anonymous namespace)::Arm_relobjfalse::do_relocate_sections at arm.cc:6471 #8 relocate_sections at object.h:2337 #9 gold::Sized_relobj_file32, false::do_relocate at reloc.cc:670 #10 relocate at object.h:1074 #11 gold::Relocate_task::run at reloc.cc:239 #12 gold::Workqueue::find_and_run_task at workqueue.cc:319 Worth a separate report? -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13521] New: ld.gold prefers unversioned symbol over default version
http://sourceware.org/bugzilla/show_bug.cgi?id=13521 Bug #: 13521 Summary: ld.gold prefers unversioned symbol over default version Product: binutils Version: 2.23 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold AssignedTo: i...@airs.com ReportedBy: jrnie...@gmail.com CC: ccout...@google.com Classification: Unclassified Created attachment 6119 -- http://sourceware.org/bugzilla/attachment.cgi?id=6119 simple object with reference to lzma_code before linking The ld manual (section VERSION) explains how to allow multiple versions of the same function to appear in a given shared library[1]. Debian liblzma5 5.1.1alpha+20110809-3 does that. It provides two versions of the lzma_code function --- an unversioned compatibility symbol and a versioned symbol: | $ eu-readelf -s /usr/lib/x86_64-linux-gnu/liblzma.so.5.0.0 | grep lzma_code |32: 30f0142 FUNCGLOBAL DEFAULT 13 lzma_code |33: 3020202 FUNCGLOBAL DEFAULT 13 lzma_code@@XZ_5.0 When I link to the library using ld.bfd, the versioned symbol is preferred, as I'd expect[2]: | $ ld.bfd -o test.bfd test.o -llzma | ld.bfd: warning: cannot find entry symbol _start; defaulting to 00400270 | $ eu-readelf -s test.bfd | grep lzma_code | 1: 0 FUNCGLOBAL DEFAULTUNDEF lzma_code@XZ_5.0 (2) |17: 0 FUNCGLOBAL DEFAULTUNDEF lzma_code@@XZ_5.0 By contrast, ld.gold seems to prefer the unversioned symbol. | $ ld.gold -o test.gold test.o -llzma | $ eu-readelf -s test.gold | grep lzma_code | 1: 0 FUNCGLOBAL DEFAULTUNDEF lzma_code | 5: 0 FUNCGLOBAL DEFAULTUNDEF lzma_code Reproducible with binutils 2.22 and with a current snapshot of HEAD (3d38152c, 2011-12-19). Known problem? Any hints for tracking it down? [1] “The second GNU extension is to allow multiple versions of the same function to appear in a given shared library. In this way you can make an incompatible change to an interface without increasing the major version number of the shared library, while still allowing applications linked against the old interface to continue to function. “To do this, you must use multiple `.symver' directives in the source file. Here is an example: __asm__(.symver original_foo,foo@); __asm__(.symver old_foo,foo@VERS_1.1); __asm__(.symver old_foo1,foo@VERS_1.2); __asm__(.symver new_foo,foo@@VERS_2.0); “In this example, `foo@' represents the symbol `foo' bound to the unspecified base version of the symbol. The source file that contains this example would define 4 C functions: `original_foo', `old_foo', `old_foo1', and `new_foo'.” [2] “When you have multiple definitions of a given symbol, there needs to be some way to specify a default version to which external references to this symbol will be bound. You can do this with the `foo@@VERS_2.0' type of `.symver' directive. You can only declare one version of a symbol as the default in this manner; otherwise you would effectively have multiple definitions of the same symbol.” -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13521] ld.gold prefers unversioned symbol over default version
http://sourceware.org/bugzilla/show_bug.cgi?id=13521 --- Comment #1 from Jonathan Nieder jrnieder at gmail dot com 2011-12-20 07:14:36 UTC --- Created attachment 6120 -- http://sourceware.org/bugzilla/attachment.cgi?id=6120 DSO with versioned and unversioned lzma_code symbol (Debian liblzma5 5.1.1alpha+20110809-3) -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13521] ld.gold prefers unversioned symbol over default version
http://sourceware.org/bugzilla/show_bug.cgi?id=13521 --- Comment #2 from Jonathan Nieder jrnieder at gmail dot com 2011-12-20 07:17:03 UTC --- Created attachment 6121 -- http://sourceware.org/bugzilla/attachment.cgi?id=6121 output from ld.gold -o output.gold test.o liblzma.so.5.0.0, which should refer to the versioned symbol but refers to the unversioned symbol instead -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13362] internal error in value_from_output_section, at ../../gold/reloc.cc:1549 on armel
http://sourceware.org/bugzilla/show_bug.cgi?id=13362 Jonathan Nieder jrnieder at gmail dot com changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED --- Comment #13 from Jonathan Nieder jrnieder at gmail dot com 2011-12-20 08:44:32 UTC --- Seems to be fixed, based on a test with upstream binutils 2.22. Thanks for making it happen. -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/13521] ld.gold prefers unversioned symbol over default version
http://sourceware.org/bugzilla/show_bug.cgi?id=13521 --- Comment #3 from Jonathan Nieder jrnieder at gmail dot com 2012-01-07 23:18:15 UTC --- Bug causes spurious references to the wrong version of symbols (namely the unversioned symbol), meaning ld.gold produces output and exits with status 0 but the resulting binaries are actually mislinked. ld.bfd copes fine. Report includes a testcase. What can I do to help move this forward? -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/13081] Assertion fail /bfd/elf.c:6668; internal error, aborting...
http://sourceware.org/bugzilla/show_bug.cgi?id=13081 Jonathan Nieder jrnieder at gmail dot com changed: What|Removed |Added CC||jrnieder at gmail dot com -- 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 https://lists.gnu.org/mailman/listinfo/bug-binutils