[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbo
From: |
matz at suse dot de |
Subject: |
[Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04 |
Date: |
Mon, 01 Feb 2021 16:08:05 +0000 |
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.
- [Bug ld/27311] New: ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, mliska at suse dot cz, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, mliska at suse dot cz, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, mliska at suse dot cz, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, hjl.tools at gmail dot com, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04,
matz at suse dot de <=
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, matz at suse dot de, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, hjl.tools at gmail dot com, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, matz at suse dot de, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, amodra at gmail dot com, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, amodra at gmail dot com, 2021/02/01
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, cvs-commit at gcc dot gnu.org, 2021/02/02
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, amodra at gmail dot com, 2021/02/02
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, amodra at gmail dot com, 2021/02/02
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, cvs-commit at gcc dot gnu.org, 2021/02/02
- [Bug ld/27311] ld.bfd (symbol from plugin): undefined reference to symbol since b1a92c635c1ec10fd703302ce1fc4ab3a8515a04, cvs-commit at gcc dot gnu.org, 2021/02/03