GCC 8.3.0, libatomic and text relocations

Kacvinsky, Tom Tom.Kacvinsky@vector.com
Sun Sep 22 16:12:00 GMT 2019


Hi all,

I have built GCC 8.3.0 on a RHEL 5 machine, using the build triplet i386-redhat-linux.
Since I chose i386 as the architecture, the resulting object code I have needs libatomic.

What I found is that with SELInux enabled, my programs die with an error die to having
text relocations.  That is with libatomic linked in statically (because we don't want to
ship libatomic with our product).  The symbol that it complains about is _init, though it
is not saying which file needs to be recompiled with -fPIC.  If I do not link in libatomic
statically, the problem goes away.

Has anyone else seen this?

Tom



More information about the Gcc-help mailing list