aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-reloc.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-03-16 02:16:30 +0000
committerUlrich Drepper <drepper@redhat.com>2009-03-16 02:16:30 +0000
commit2ca285b098890abde89fc79bbaf69432b14f18d1 (patch)
treed08f6c7bd1d6b3d5d11eeb3a311650afdf317a4c /elf/dl-reloc.c
parent7e342603659dddcb768a516b93844870884ad2c4 (diff)
downloadglibc-2ca285b098890abde89fc79bbaf69432b14f18d1.tar
glibc-2ca285b098890abde89fc79bbaf69432b14f18d1.tar.gz
glibc-2ca285b098890abde89fc79bbaf69432b14f18d1.tar.bz2
glibc-2ca285b098890abde89fc79bbaf69432b14f18d1.zip
[BZ #9733]
* elf/dl-load.c (_dl_map_object_from_fd): Only call audit hooks if we are not loading a new audit library. * elf/dl-reloc (_dl_relocate_object): Third parameter is now a bitmask. Only use profiling trampoline for auditing if we are not relocating an audit library. * elf/dl-open.c (dl_open_worker): Adjust _dl_relocate_object call. * elf/rtld.c: Likewise. * sysdeps/generic/ldsodefs.h: Adjust _dl_relocate_object prototype.
Diffstat (limited to 'elf/dl-reloc.c')
-rw-r--r--elf/dl-reloc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index a303cb4ce6..28f08de3e7 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -1,5 +1,5 @@
/* Relocate a shared object and resolve its references to other loaded objects.
- Copyright (C) 1995-2004, 2005, 2006, 2008 Free Software Foundation, Inc.
+ Copyright (C) 1995-2006, 2008, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -151,7 +151,7 @@ _dl_nothread_init_static_tls (struct link_map *map)
void
_dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
- int lazy, int consider_profiling)
+ int reloc_mode, int consider_profiling)
{
struct textrels
{
@@ -162,10 +162,12 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
} *textrels = NULL;
/* Initialize it to make the compiler happy. */
const char *errstring = NULL;
+ int lazy = reloc_mode & RTLD_LAZY;
#ifdef SHARED
/* If we are auditing, install the same handlers we need for profiling. */
- consider_profiling |= GLRO(dl_audit) != NULL;
+ if ((reloc_mode & __RTLD_AUDIT) == 0)
+ consider_profiling |= GLRO(dl_audit) != NULL;
#elif defined PROF
/* Never use dynamic linker profiling for gprof profiling code. */
# define consider_profiling 0