This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[patch] Remove sprof default installation
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: libc-alpha at sourceware dot org
- Cc: Olivier Fourdan <ofourdan at redhat dot com>
- Date: Wed, 13 Aug 2008 15:32:45 +0200
- Subject: [patch] Remove sprof default installation
Hi,
currently sprof is broken:
$ sprof -p ./hello.so ./hello.so.profile
sprof: failed to load shared object `./hello.so'
because __RTLD_SPROF is no longer supported by dlopen_doit(), moreover it
later crashes on corrupted `r_state'. Bugreported by Olivier Fourdan.
As gprof/-pg/sprof is now obsoleted by oprofile suggesting to start removing
its support rather than fixing it.
Regards,
Jan
2008-08-13 Jan Kratochvil <jan.kratochvil@redhat.com>
Remove the `sprof' default installation and its support.
* elf/Makefile (install-bin): Remove.
* elf/dl-open.c (dl_open_worker) <__RTLD_SPROF>: Remove.
* elf/sprof.c (load_shobj): Remove __RTLD_SPROF.
* include/dlfcn.h (__RTLD_SPROF): Remove.
--- ./elf/Makefile 1 Aug 2008 07:51:40 -0000 1.327
+++ ./elf/Makefile 13 Aug 2008 12:36:44 -0000
@@ -122,7 +122,6 @@ install-bin-script = ldd
endif
others = sprof sln
-install-bin = sprof
others-static = sln
install-rootsbin = sln
--- ./elf/dl-open.c 29 Sep 2007 06:56:55 -0000 1.143
+++ ./elf/dl-open.c 13 Aug 2008 12:36:44 -0000
@@ -301,10 +301,6 @@ dl_open_worker (void *a)
return;
}
- if (__builtin_expect (mode & __RTLD_SPROF, 0))
- /* This happens only if we load a DSO for 'sprof'. */
- return;
-
/* This object is directly loaded. */
++new->l_direct_opencount;
--- ./elf/sprof.c 2 Jan 2008 19:25:22 -0000 1.32
+++ ./elf/sprof.c 13 Aug 2008 12:36:47 -0000
@@ -390,11 +390,11 @@ load_shobj (const char *name)
char *load_name = (char *) alloca (strlen (name) + 3);
stpcpy (stpcpy (load_name, "./"), name);
- map = (struct link_map *) dlopen (load_name, RTLD_LAZY | __RTLD_SPROF);
+ map = (struct link_map *) dlopen (load_name, RTLD_LAZY);
}
if (map == NULL)
{
- map = (struct link_map *) dlopen (name, RTLD_LAZY | __RTLD_SPROF);
+ map = (struct link_map *) dlopen (name, RTLD_LAZY);
if (map == NULL)
{
error (0, errno, _("failed to load shared object `%s'"), name);
--- ./include/dlfcn.h 17 Mar 2007 17:08:13 -0000 1.24
+++ ./include/dlfcn.h 13 Aug 2008 12:36:48 -0000
@@ -5,7 +5,6 @@
/* Internally used flag. */
#define __RTLD_DLOPEN 0x80000000
-#define __RTLD_SPROF 0x40000000
#define __RTLD_OPENEXEC 0x20000000
#define __RTLD_CALLMAP 0x10000000
#define __RTLD_AUDIT 0x08000000