This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [IFUNC] PATCH: Add an ifunc attribute


Richard Guenther wrote:
> On Sun, Jun 28, 2009 at 9:39 PM, H.J. Lu<hjl.tools@gmail.com> wrote:
>> When using asm to change C++ symbol name, you have to mangle it
>> by hand. When you change the prototype of the ifunc function,
>> you have to mangle the symbol name again.  Should we ask gcc
>> users which approach is better?
> 
> No.
> 
> Richard.

  There are other occasions when it might be useful to expose
mangling/demangling operations within the compiler itself.  Writing functions
to work with LD's "--wrap" operation is tricky in C++!  Maybe we should add a
new macro: __UGLY_FUNCTION__ ?  ;-)  Yeh, I know - it wouldn't be any use
because it's not actually a pre-processor macro.  (Thinks: maybe should add
__attribute__ ((wrap)) and __attribute__ ((real)) to direct GCC to prefix the
DECL_ASSEMBLER_NAME appropriately.)

    cheers,
      DaveK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]