Hello everybody.

I've already written that to the gcc-help list but there was no answer. 
I want to use the "ifunc" Attribute within my GCC plugin. The code should
look like: 

typedef void (bar_fn_t)(uint32_t *);
bar_fn_t bar __attribute__((ifunc("resolve_bar")));

I think I know how to build and assign attributes. It should be
something like: 
DECL_ATTRIBUTES(decl) = tree_cons(get_identifier("ifunc"), args, 
DECL_ATTRIBUTES(decl));
DECL_ATTRIBUTES(decl) = tree_cons(get_identifier("alias"), args, 
DECL_ATTRIBUTES(decl));
It just compiles fine, but bar is no "gnu_indirect_function".

Thanks for your help!

Johannes Z.



Reply via email to