STT_GNU_IFUNC with OpenMP

Johannes Ziegenbalg johannes.ziegenbalg@gmail.com
Fri Sep 21 13:31:00 GMT 2012


Hi guys,

I hope you can Help me with this. I wrote a GCC plugin for cloning
functions. This plugin also builds the resolver function and converts
the original function into a gnu_indirect_function. 

Now i got a problem, I'm compiling some Fortran code witch uses OpenMP
pragmas. Everything went fine, except for linking everything together. 
There always is an SIGSEV or an error like:
"/usr/bin/ld: dynamic STT_GNU_IFUNC symbol '...' with pointer equality
in '...' can not be used when making an executable; recompile with -fPIE
and relink with -pie"

I know the error comes from the "_bfd_elf_allocate_ifunc_dyn_relocs"
function. I also found out that compiling with the -fopenmp option
causes the problems.
I can't figure out where exactly the problem is. Is the IFUNC attribute
not compatible with OpenMP or pthreads? Or is it a Bug? 

Thanks for your help!

Johannes Z.




More information about the Gcc-help mailing list