https://sourceware.org/bugzilla/show_bug.cgi?id=16746
Bug ID: 16746 Summary: ld complains about .gnu.warning symbols referenced by linker plugin inputs Product: binutils Version: 2.24 Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: rguenth at gcc dot gnu.org t.c --- extern void foobar (void); int main (int argc, char **argv) { if (__builtin_constant_p (argc)) foobar (); return 0; } t2.c --- static const char __evoke_link_warning_foobar[] __attribute__ ((used, section (".gnu.warning.foobar\n\t#"))) = "foobar"; > gcc -c t2.c > gcc t.c t2.o -O -flto /tmp/cctYGzQc.o (symbol from plugin): warning: foobar the symbol table from the t.o input claimed by lto-plugin contains a reference to foobar () - which is the point LD already warns - but the replacement object fed from lto-plugin to the linker doesn't contain this reference anymore. Thus, LD shouldn't complain about references in files claimed by a linker plugin but only about references in files provided by the linker plugin. This works correctly with gold. -- 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