https://sourceware.org/bugzilla/show_bug.cgi?id=22967
--- Comment #2 from Martin Liska <mliska at suse dot cz> ---
(In reply to Nick Clifton from comment #1)
> Hi Martin,
>
> > nm uses 'i' letter for GNU IFUNC symbols and it would be good to use
> > different letters for local and global ones. Similar what's done with 't'
> > and 'T'
>
> Would you mind uploading an object file/executable containing both types
> of ifunc ? Then I can see about fixing nm. (Yes, I could create one myself
> but I am lazy^H^H^H^H busy).
>
> Cheers
> Nick
Sure, there's one static (local):
$ cat /tmp/ifunc.c
static volatile int a;
static int my_foo1 (void) { return 1; }
static int my_foo2 (void) { return 2; }
typedef int (*F) (void);
static F resolve_foo (void) { if (a) return my_foo1; else return my_foo2; }
static int foo (void) __attribute__ ((ifunc ("resolve_foo")));
int
main ()
{
if (foo () != 2)
__builtin_abort ();
}
Commenting static before 'int foo' you get a global one.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils