https://sourceware.org/bugzilla/show_bug.cgi?id=27311
--- Comment #3 from Michael Matz <matz at suse dot de> --- FWIW, it's important that the symbol in question is defined in an indirect shared lib with a symversion, and defined in an input object file itself. I.e. this is more self-contained: % cat lib1.c void inlib1(void) {} % cat lib2.c void inlib2(void) {} % cat app.c void inlib1(void) {} int main() { return 0; } % cat version.txt LIBFOO { *; }; % gcc -shared -fPIC -o lib1.so lib1.c -Wl,-version-script,version.txt % gcc -shared -fPIC -o lib2.so lib2.c -Wl,--no-as-needed lib1.so % gcc -c -flto app.c % gcc app.o -L. -Wl,-rpath-link,. -l2 /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: app.o (symbol from plugin): undefined reference to symbol 'inlib1@@LIBFOO' /usr/lib64/gcc/x86_64-suse-linux/10/../../../../x86_64-suse-linux/bin/ld: ./lib1.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status -- You are receiving this mail because: You are on the CC list for the bug.