[Bug binutils/24365] Crash due to RISC-V relocation
https://sourceware.org/bugzilla/show_bug.cgi?id=24365 Jim Wilson changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2019-03-20 Assignee|unassigned at sourceware dot org |wilson at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #1 from Jim Wilson --- I never tried this with a global symbol. This only works for local symbols. sym is only set for local symbols. h is only set for global symbols. Gas won't let me create a global section symbol, but bfd appears to have some support for that, and I can't rule out that other assemblers might do this. So we need to support both. Looks like the right fix is - if ((ELF_ST_TYPE (sym->st_info) == STT_SECTION) && rel->r_addend) + if (((sym != NULL && (ELF_ST_TYPE (sym->st_info) == STT_SECTION)) + || (h != NULL && h->type == STT_SECTION)) + && rel->r_addend) I had to hack gas to let me create a global section symbol to test that, which means I can't easily add a testcase to verify this case. -- 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 ld/14170] ld: assertion fail /export/gnu/import/git/binutils/bfd/linker.c:641
https://sourceware.org/bugzilla/show_bug.cgi?id=14170 --- Comment #9 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Alan Modra : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=980a2e42f7439015defdcedad89a13a72749bdb0 commit 980a2e42f7439015defdcedad89a13a72749bdb0 Author: Alan Modra Date: Thu Mar 21 08:39:18 2019 +1030 lm32-linux ld testsuite fails A number of the fails are due to ld supporting the creation of shared libraries but not allowing linking against them without using an option like -Bdynamic. FAIL: Symbol export class test (final shared object) FAIL: PROVIDE_HIDDEN test 4 FAIL: PROVIDE_HIDDEN test 6 FAIL: PROVIDE_HIDDEN test 10 FAIL: PROVIDE_HIDDEN test 12 FAIL: Build pr22471b.so FAIL: Build pr22649-2b.so FAIL: Build pr22649-2d.so FAIL: PR ld/20828 dynamic symbols with section GC (plain) FAIL: PR ld/20828 dynamic symbols with section GC (version script) FAIL: PR ld/20828 dynamic symbols with section GC (versioned) FAIL: PR ld/21233 dynamic symbols with section GC (--undefined) FAIL: PR ld/21233 dynamic symbols with section GC (--require-defined) FAIL: PR ld/21233 dynamic symbols with section GC (EXTERN) FAIL: Build pr22150 FAIL: PR ld/14170 FAIL: Link using broken linker script FAIL: pr17068 link --as-needed lib in group FAIL: ld-gc/pr20022 * emulparams/elf32lm32fd.sh (DYNAMIC_LINK): Undef. -- 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 ld/21233] Internal error, /usr/bin/ld: BFD (GNU Binutils for Debian) 2.28 assertion fail ../../bfd/elfxx-mips.c:3861
https://sourceware.org/bugzilla/show_bug.cgi?id=21233 --- Comment #23 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Alan Modra : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=980a2e42f7439015defdcedad89a13a72749bdb0 commit 980a2e42f7439015defdcedad89a13a72749bdb0 Author: Alan Modra Date: Thu Mar 21 08:39:18 2019 +1030 lm32-linux ld testsuite fails A number of the fails are due to ld supporting the creation of shared libraries but not allowing linking against them without using an option like -Bdynamic. FAIL: Symbol export class test (final shared object) FAIL: PROVIDE_HIDDEN test 4 FAIL: PROVIDE_HIDDEN test 6 FAIL: PROVIDE_HIDDEN test 10 FAIL: PROVIDE_HIDDEN test 12 FAIL: Build pr22471b.so FAIL: Build pr22649-2b.so FAIL: Build pr22649-2d.so FAIL: PR ld/20828 dynamic symbols with section GC (plain) FAIL: PR ld/20828 dynamic symbols with section GC (version script) FAIL: PR ld/20828 dynamic symbols with section GC (versioned) FAIL: PR ld/21233 dynamic symbols with section GC (--undefined) FAIL: PR ld/21233 dynamic symbols with section GC (--require-defined) FAIL: PR ld/21233 dynamic symbols with section GC (EXTERN) FAIL: Build pr22150 FAIL: PR ld/14170 FAIL: Link using broken linker script FAIL: pr17068 link --as-needed lib in group FAIL: ld-gc/pr20022 * emulparams/elf32lm32fd.sh (DYNAMIC_LINK): Undef. -- 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 ld/20828] GC-ed DSO symbols make corresponding symbols defined by a linker script local
https://sourceware.org/bugzilla/show_bug.cgi?id=20828 --- Comment #42 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Alan Modra : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=980a2e42f7439015defdcedad89a13a72749bdb0 commit 980a2e42f7439015defdcedad89a13a72749bdb0 Author: Alan Modra Date: Thu Mar 21 08:39:18 2019 +1030 lm32-linux ld testsuite fails A number of the fails are due to ld supporting the creation of shared libraries but not allowing linking against them without using an option like -Bdynamic. FAIL: Symbol export class test (final shared object) FAIL: PROVIDE_HIDDEN test 4 FAIL: PROVIDE_HIDDEN test 6 FAIL: PROVIDE_HIDDEN test 10 FAIL: PROVIDE_HIDDEN test 12 FAIL: Build pr22471b.so FAIL: Build pr22649-2b.so FAIL: Build pr22649-2d.so FAIL: PR ld/20828 dynamic symbols with section GC (plain) FAIL: PR ld/20828 dynamic symbols with section GC (version script) FAIL: PR ld/20828 dynamic symbols with section GC (versioned) FAIL: PR ld/21233 dynamic symbols with section GC (--undefined) FAIL: PR ld/21233 dynamic symbols with section GC (--require-defined) FAIL: PR ld/21233 dynamic symbols with section GC (EXTERN) FAIL: Build pr22150 FAIL: PR ld/14170 FAIL: Link using broken linker script FAIL: pr17068 link --as-needed lib in group FAIL: ld-gc/pr20022 * emulparams/elf32lm32fd.sh (DYNAMIC_LINK): Undef. -- 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 binutils/24365] Crash due to RISC-V relocation
https://sourceware.org/bugzilla/show_bug.cgi?id=24365 Luís Marques changed: What|Removed |Added CC||luismarques at lowrisc dot org, ||wilson at gcc dot gnu.org, ||wilson at tuliptree dot org -- 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 binutils/24365] New: Crash due to RISC-V relocation
https://sourceware.org/bugzilla/show_bug.cgi?id=24365 Bug ID: 24365 Summary: Crash due to RISC-V relocation Product: binutils Version: 2.32 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: luismarques at lowrisc dot org Target Milestone: --- (Using the RISC-V GNU toolchain built from the commit afcc8bc655d30cf6af054ac1d3f5f89d0627aa79 of https://github.com/riscv/riscv-gnu-toolchain.git, commit a9d9a104dde6a749f40ce5c4576a0042a7d52d1f of riscv-binutils) $ cat gnurelocbug.s .global test test: auipc t0, %pcrel_hi(test) addi t0, t0, %pcrel_lo(test) $ riscv32-unknown-elf-gcc gnurelocbug.s collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped compilation terminated. $ gdb riscv32-unknown-elf-ld (gdb) run gnurelocbug.o Starting program: riscv32-unknown-elf-ld gnurelocbug.o riscv32-unknown-elf-ld: warning: cannot find entry symbol _start; defaulting to 00010054 Program received signal SIGSEGV, Segmentation fault. riscv_elf_relocate_section (output_bfd=output_bfd@entry=0x556ae180, info=0x556a7d00 , input_bfd=input_bfd@entry=0x556cd770, input_section=input_section@entry=0x556ce950, contents=0x556cc760 "\227\002", relocs=relocs@entry=0x556d11e0, local_syms=0x556d1c40, local_sections=0x556e5810) at riscv-gnu-toolchain/riscv-binutils/bfd/elfnn-riscv.c:2062 2062 if ((ELF_ST_TYPE (sym->st_info) == STT_SECTION) && rel->r_addend) -- 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 ld/23839] ld generates a corrupted relocation table for .ARM.exidx sections
https://sourceware.org/bugzilla/show_bug.cgi?id=23839 --- Comment #3 from Nick Clifton --- (In reply to Philippe Daouadi from comment #2) Hi Philippe, > If you have a C++ project at hand that cross-compiles to ARM, maybe you can Sorry - I do not have one of those. :-( I did consider adding in the patch anyway, although converting the printf() to an abort(), but there are cases where it is valid for a relocation to have an offset that is larger than the section size, so that would not work. Unfortunately it seems that in order to fix this problem we are really going to need a reproducer. By the way, what configuration are you using ? Cheers Nick PS. It may turn out that these large C++ programs really are too large and that they cannot be linked successfully. Obviously the linker should not silently be producing broken executables, but in the end it may turn out that there is no real solution to the underlying problem... -- 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