[Bug ld/21529] New: internal error, aborting at ../../bfd/linker.c:2162 in _bfd_generic_link_output_symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=21529 Bug ID: 21529 Summary: internal error, aborting at ../../bfd/linker.c:2162 in _bfd_generic_link_output_symbols Product: binutils Version: 2.28 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: fero.4.22 at gmail dot com Target Milestone: --- Created attachment 10070 --> https://sourceware.org/bugzilla/attachment.cgi?id=10070&action=edit small example Hi. I have received an internal error when linking an elf to a flat binary, that contains a globally unique symbol (marked as "u" by nm). It only happens if I try to produce a flat binary, and works normally when the result is an elf file. The symbol is a static variable in a template class (I think it would be the same if the template is a function, but I haven't tried it...) I have attached a simple example source file that demonstrates the bug. You can compile it with the following commands: g++ -c main.cpp -o main.o ld main.o --oformat binary -o main.bin -e main The last command results in: 'ld: BFD (GNU Binutils for Ubuntu) 2.28 internal error, aborting at ../../bfd/linker.c:2162 in _bfd_generic_link_output_symbols ld: Please report this bug.' The problem is related to the symbol _ZN3fooILi4EE3barE (foo<4>::bar). -- 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/21523] Relocation for R_ARM_THM_ALU_PREL_11_0 is not calculated correctly
https://sourceware.org/bugzilla/show_bug.cgi?id=21523 --- Comment #3 from clegg89 at gmail dot com --- Created attachment 10071 --> https://sourceware.org/bugzilla/attachment.cgi?id=10071&action=edit Test Case The object file test.o contains two relocations, both of type R_ARM_THM_ALU_PREL_11_0, as can be seen by arm-none-eabi-objdump: arm-none-eabi-objdump -rd test.o: test.o: file format elf32-littlearm Disassembly of section .text: : 0: f2af 0004 subwr0, pc, #4 0: R_ARM_THM_ALU_PREL_11_0 aValue 4: 4770bx lr ... 0008 : 8: 6854 7369 6920 2073 2061 6574 7473 000a This is a test.. 0018 : 18: f2af 0004 subwr0, pc, #4 18: R_ARM_THM_ALU_PREL_11_0 aValue 1c: 4770bx lr When attempting to link this object file, the first relocation (in getOtherValue) is performed without issue. However, the second relocation (in getValue) throws an error: test.o: In function `getValue': test:(.text+0x18): relocation truncated to fit: R_ARM_THM_ALU_PREL_11_0 against symbol `aValue' defined in .text section in test.o Details on how to build the project can be found in README.md -- 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/21529] internal error, aborting at ../../bfd/linker.c:2162 in _bfd_generic_link_output_symbols
https://sourceware.org/bugzilla/show_bug.cgi?id=21529 Fero changed: What|Removed |Added CC||fero.4.22 at gmail dot com -- 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/21523] Relocation for R_ARM_THM_ALU_PREL_11_0 is not calculated correctly
https://sourceware.org/bugzilla/show_bug.cgi?id=21523 --- Comment #4 from clegg89 at gmail dot com --- Created attachment 10072 --> https://sourceware.org/bugzilla/attachment.cgi?id=10072&action=edit Patch to fix R_ARM_THM_ALU_PREL_11_0 relocation -- 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/21523] Relocation for R_ARM_THM_ALU_PREL_11_0 is not calculated correctly
https://sourceware.org/bugzilla/show_bug.cgi?id=21523 clegg89 at gmail dot com changed: What|Removed |Added Attachment #10072|0 |1 is obsolete|| --- Comment #5 from clegg89 at gmail dot com --- Created attachment 10073 --> https://sourceware.org/bugzilla/attachment.cgi?id=10073&action=edit Patch to fix R_ARM_THM_ALU_PREL_11_0 (git pull) -- 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