From 2ca285b098890abde89fc79bbaf69432b14f18d1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 16 Mar 2009 02:16:30 +0000 Subject: [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. --- elf/dl-reloc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'elf/dl-reloc.c') diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c index a303cb4..28f08de 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 -- cgit v1.1