1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
* 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.
This commit is contained in:
Ulrich Drepper
2009-03-16 02:16:30 +00:00
parent 7e34260365
commit 2ca285b098
6 changed files with 32 additions and 16 deletions

View File

@@ -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