https://sourceware.org/bugzilla/show_bug.cgi?id=21961
Bug ID: 21961 Summary: --orphan-handling=error fails in 2.29 because of changed .group handling Product: binutils Version: 2.29 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: franz.sirl at lauterbach dot com Target Milestone: --- This testcase highlights a change in 2.29 .group handling: /* group.c * * Compile/link like this: * gcc -c -o group.o group.c * ld --orphan-handling=error -emain -Bstatic -o a.out group.o * * Produces output like this: * ld: error: unplaced orphan section '.group' from 'group.o'. * * Problem: .group not handled in default linker script(s) * + binutils-2.29 producing .group sections for C++ code * * Tested with binutils-2.29 + gcc-7.2.0 on x86_64-linux-gnu and powerpc-unknown-eabi */ /* assembler source copied from binutils testsuite group-3.s */ asm( "\t.section .text.foo3,\"axG\",%progbits,foo3,comdat\n" "\t.global foo3\n" "foo3:\n" "\t.word 0\n" "\t.section .data.bar3,\"awG\",%progbits,foo3,comdat\n" "\t.global bar3\n" "bar3:\n" "\t.word 0"); int main(int argc, char *argv[]) { return 0; } void __eabi(void) { } I'm not sure what exactly the bug is, either the .group sections shouldn't reach the final link stage or the default linker scripts need updating. binutils-2.28 links the same testcase without error. The problem originally happened with an embedded C++ codebase (PowerPC32+newlib). -- 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