summaryrefslogtreecommitdiff
path: root/elf/rtld.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@redhat.com>2011-10-04 16:10:16 +0200
committerAndreas Schwab <schwab@redhat.com>2011-10-05 14:35:40 +0200
commit3a62d00d408e9ec19479b6c7d39e89021061f9cd (patch)
tree6f2c708cb3da2fe6d0cbcddfe096cc7e7a8051ba /elf/rtld.c
parent68577918437e2ccfd6bd2836892f59ef42994963 (diff)
downloadglibc-3a62d00d408e9ec19479b6c7d39e89021061f9cd.tar.gz
Don't call ifunc functions in trace mode
Diffstat (limited to 'elf/rtld.c')
-rw-r--r--elf/rtld.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/elf/rtld.c b/elf/rtld.c
index 324d979107..e4e413f601 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -544,7 +544,7 @@ _dl_start (void *arg)
/* Relocate ourselves so we can do normal function calls and
data access using the global offset table. */
- ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0);
+ ELF_DYNAMIC_RELOCATE (&bootstrap_map, 0, 0, 0);
}
bootstrap_map.l_relocated = 1;
@@ -1951,8 +1951,9 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
/* Relocate the main executable. */
struct relocate_args args = { .l = l,
- .reloc_mode = (GLRO(dl_lazy)
- ? RTLD_LAZY : 0) };
+ .reloc_mode = ((GLRO(dl_lazy)
+ ? RTLD_LAZY : 0)
+ | __RTLD_NOIFUNC) };
_dl_receive_error (print_unresolved, relocate_doit, &args);
/* This loop depends on the dependencies of the executable to
@@ -2029,7 +2030,8 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
struct relocate_args args;
unsigned int i;
- args.reloc_mode = GLRO(dl_lazy) ? RTLD_LAZY : 0;
+ args.reloc_mode = ((GLRO(dl_lazy) ? RTLD_LAZY : 0)
+ | __RTLD_NOIFUNC);
i = main_map->l_searchlist.r_nlist;
while (i-- > 0)
@@ -2049,7 +2051,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
/* Mark the link map as not yet relocated again. */
GL(dl_rtld_map).l_relocated = 0;
_dl_relocate_object (&GL(dl_rtld_map),
- main_map->l_scope, 0, 0);
+ main_map->l_scope, __RTLD_NOIFUNC, 0);
}
}
#define VERNEEDTAG (DT_NUM + DT_THISPROCNUM + DT_VERSIONTAGIDX (DT_VERNEED))