Re: ifunc attribute in C++

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

 




On Fri, 30 Jan 2015, asomers@xxxxxxxxx wrote:

> Does the ifunc attribute work in C++, and if so can somebody please
> show me a working example?  I found several examples that work in C,
> but none in C++.  For example, the below file works fine in C:

Yes, it works in C++; the issue you're hitting is that due to C++ name
mangling, the assembler name of the resolver function (foo_ifunc) is changed,
and no longer matches what you wrote in the attribute.  Perhaps the easiest
fix for that is to put the resolver inside an 'extern "C" { ... }' block.

HTH.
Alexander




[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