$ cat test.c
struct A
{
virtual void aaa()
{
}
};
void foo()
{
A myA;
}
$ arm-elf-g++ -O6 test.c -c -o test.o
$ arm-elf-ld -r --gc-sections --entry _Z3foov test.o -o test.o2
with GDB:
Program received signal SIGSEGV, Segmentation fault.
0x0042a5d4 in bfd_elf_set_group_contents (abfd=0x23fd98, sec=0x14a1658,
failedptrarg=0x108fe34) at ../../../sources/binutils-2.19/bfd/elf.c:2760
2760idx = elf_section_data (s)->this_idx;
---
The error disappears if the object was not compiled with -O6.
--
Summary: ld crashes in bfd/elf.c bfd_elf_set_group_contents()
Product: binutils
Version: 2.19
Status: NEW
Severity: normal
Priority: P2
Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: bruck dot michael at googlemail dot com
CC: bug-binutils at gnu dot org
GCC host triplet: mingw32
GCC target triplet: arm-elf
http://sourceware.org/bugzilla/show_bug.cgi?id=9727
--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.
___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils