diff options
author | Andreas Schwab <schwab@redhat.com> | 2009-11-12 18:00:10 +0100 |
---|---|---|
committer | Andreas Schwab <schwab@redhat.com> | 2009-11-12 18:00:10 +0100 |
commit | b975c921d68e42868a5e97f70f449ecf45c2d9eb (patch) | |
tree | 073284bb48e9a9b21afd13366f5eba06cfb22a5f /elf | |
parent | dcdbf85d97d878dc90f5681124485c1633bc9423 (diff) | |
parent | 24c0bf7a76ecec65aca0dbce1f7ebb8f68425dc2 (diff) |
Merge remote branch 'origin/master' into fedora/master
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-sym.c | 9 | ||||
-rw-r--r-- | elf/ifuncmain3.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/elf/dl-sym.c b/elf/dl-sym.c index 459729f0f2..4faf05c00b 100644 --- a/elf/dl-sym.c +++ b/elf/dl-sym.c @@ -193,8 +193,13 @@ RTLD_NEXT used in code not dynamically loaded")); /* Resolve indirect function address. */ if (__builtin_expect (ELFW(ST_TYPE) (ref->st_info) == STT_GNU_IFUNC, 0)) - value - = ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (value)) (); + { + DL_FIXUP_VALUE_TYPE fixup + = DL_FIXUP_MAKE_VALUE (result, (ElfW(Addr)) value); + fixup = + ((DL_FIXUP_VALUE_TYPE (*) (void)) DL_FIXUP_VALUE_ADDR (fixup)) (); + value = (void *) DL_FIXUP_VALUE_CODE_ADDR (fixup); + } #ifdef SHARED /* Auditing checkpoint: we have a new binding. Provide the diff --git a/elf/ifuncmain3.c b/elf/ifuncmain3.c index 5d067cced9..1574dd5cbe 100644 --- a/elf/ifuncmain3.c +++ b/elf/ifuncmain3.c @@ -46,6 +46,15 @@ main (void) return 1; } + p = dlsym (h, "foo"); + if (p == NULL) + { + printf ("symbol not found: %s\n", dlerror ()); + return 1; + } + if ((*p) () != -1) + abort (); + f = dlsym (h, "get_foo_p"); if (f == NULL) { |