https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105960
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > $COMPILE -c -o crash32.o crash32.c > $COMPILE -c -o expref.o expref.c > $CC -m32 -o liboink32.so -shared expref.o You didn't use -fPIC which is required if you are compiling a shared library.