https://sourceware.org/bugzilla/show_bug.cgi?id=19008
Bug ID: 19008 Summary: symbol references from notes sections result in errors with -gc-sections Product: binutils Version: 2.25 Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: andi-bz at firstfloor dot org Target Milestone: --- Since some time I get boot strap errors with gcc on systems with systemtap installed. It fails when linking libsupc++ like this (PR60946). systemtap sets up some complicated data structures in notes to describe trace points. `_.stapsdt.base' referenced in section `.note.stapsdt' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o): defined in discarded section `.stapsdt.base[.stapsdt.base]' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o) `_.stapsdt.base' referenced in section `.note.stapsdt' of ../libsupc++/.libs/libsupc++convenience.a(eh_throw.o): defined in discarded section `.stapsdt.base[.stapsdt.base]' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o) `_.stapsdt.base' referenced in section `.note.stapsdt' of ../libsupc++/.libs/libsupc++convenience.a(eh_throw.o): defined in discarded section `.stapsdt.base[.stapsdt.base]' of ../libsupc++/.libs/libsupc++convenience.a(eh_catch.o) collect2: error: ld returned 1 exit status I can work around it by commenting use use of -gc-sections for libstdc++. This seems like a bug. Even with gc-sections symbol references from notes sections should not result in an error. GNU ld version 2.25-8.fc22 -- 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