Re: STT_GNU_IFUNC with OpenMP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 21, 2012 at 6:30 AM, Johannes Ziegenbalg
<johannes.ziegenbalg@xxxxxxxxx> wrote:
>
> 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?

GNU indirect functions, also known as IFUNCs, do not support pointer
equality, unless you compile with -fPIE and link with -pie.  The
linker is trying to tell you that you are comparing an IFUNC for
pointer equality.

If you don't mean to do that, you need to look at your generated asm
code to find out what is going on.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux