From 74414708355a922a514d5c76183eca6931c4488a Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 31 May 2009 23:45:33 -0700 Subject: Finish IFUNC support for x86 and x86-64. Add support for the IRELAIVE relocation and IFUNC in static executables. --- include/libc-symbols.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include') diff --git a/include/libc-symbols.h b/include/libc-symbols.h index d53bcb9b77..68da77c58e 100644 --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -845,4 +845,21 @@ for linking") } \ __asm__ (".type " #name ", %gnu_indirect_function"); +#ifdef HAVE_ASM_SET_DIRECTIVE +# define libc_ifunc_hidden_def1(local, name) \ + __asm__ (declare_symbol_alias_1_stringify (ASM_GLOBAL_DIRECTIVE) \ + " " #local "\n\t" \ + ".hidden " #local "\n\t" \ + ".set " #local ", " #name); +#else +# define libc_ifunc_hidden_def1(local, name) \ + __asm__ (declare_symbol_alias_1_stringify (ASM_GLOBAL_DIRECTIVE) \ + " " #local "\n\t" \ + ".hidden " #local "\n\t" \ + #local " = " #name); +#endif + +#define libc_ifunc_hidden_def(name) \ + libc_ifunc_hidden_def1 (__GI_##name, name) + #endif /* libc-symbols.h */ -- cgit v1.2.3