summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2005-07-07 02:39:45 +0000
committerUlrich Drepper <drepper@redhat.com>2005-07-07 02:39:45 +0000
commit9f0d7b6df903729a56bc464ff3721e80906933da (patch)
treef472b38af9e806de00c3826373757829c9981227 /elf
parent016c70ea61aa2a896c7862b70e1cf4e705ba21af (diff)
downloadglibc-9f0d7b6df903729a56bc464ff3721e80906933da.tar.gz
* elf/dl-reloc.c [PROF] (_dl_relocate_object): Define
consider_profiling always to zero. Don't count of compiler to remove unreached if block. * sysdeps/x86_64/dl-trampoline.S [PROF] (_dl_runtime_profile): Don't compile. * sysdeps/i386/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. * sysdeps/ia64/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. * sysdeps/s390/s390-64/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. * sysdeps/s390/s390-32/dl-trampoline.S [PROF] (_dl_runtime_profile): Likewise. * sysdeps/powerpc/powerpc64/dl-trampoline.S [PROF] (_dl_profile_resolve): Likewise. * sysdeps/powerpc/powerpc32/dl-trampoline.S [PROF] (_dl_profile_resolve): Likewise. * gmon/Makefile: Add rules to build and run tst-profile-static. * gmon/tst-profile-static.c: New file. * Makeconfig (+link-static): Allow passing program-specific flags.
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-reloc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index 2d309fb210..117410e924 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -153,6 +153,9 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
#ifdef SHARED
/* If we are auditing, install the same handlers we need for profiling. */
consider_profiling |= GLRO(dl_audit) != NULL;
+#elif defined PROF
+ /* Never use dynamic linker profiling for gprof profiling code. */
+# define consider_profiling 0
#endif
if (l->l_relocated)
@@ -264,6 +267,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
ELF_DYNAMIC_RELOCATE (l, lazy, consider_profiling);
+#ifndef PROF
if (__builtin_expect (consider_profiling, 0))
{
/* Allocate the array which will contain the already found
@@ -288,6 +292,7 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
goto fatal;
}
}
+#endif
}
/* Mark the object so we know this work has been done. */