https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91376
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |WAITING --- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> --- (In reply to Martin Liška from comment #6) > Good, then let me take a look. So I've just tested current master of binutils and I can see: marxin@marxinbox:/tmp> gcc --version gcc (GCC) 10.0.0 20190806 (experimental) Copyright (C) 2019 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. marxin@marxinbox:/tmp> gcc -c -flto main.c $ nm main.o nm: main.o: plugin needed to handle lto object 0000000000000001 C __gnu_lto_slim The issue here is that the installed nm can't load plugin from bfd-plugins: $ strace -f -s512 nm main.o 2>&1 | grep plugin openat(AT_FDCWD, "/home/marxin/bin/binutils/bin/../bin/../lib/bfd-plugins", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 4 stat("/home/marxin/bin/binutils/bin/../bin/../lib/bfd-plugins/..", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 stat("/home/marxin/bin/binutils/bin/../bin/../lib/bfd-plugins/.", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0 write(2, "main.o: plugin needed to handle lto object", 42main.o: plugin needed to handle lto object) = 42 $ nm --plugin /dev/shm/objdir/lto-plugin/.libs/liblto_plugin.so.0.0.0 main.o 00000000 T main So the question is if you have a LTO plugin accessible for the built gold or nm?