1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
1998-06-18 16:40  Ulrich Drepper  <drepper@cygnus.com>

	* libc.map: Add _dl_profile_map, _dl_profile_output, _dl_start_profile,
	_dl_mcount, _dl_mcount_wrapper.
	* elf/Makefile (routines): Add dl-profstub.
	* elf/dl-profstub.c: New file.
	* elf/dl-support.c: Don't define _dl_profile_map.
	* elf/rtld.c: Likewise.
	* elf/dlfcn.h: Define DL_CALL_FCT macro.
	* elf/ldsodefs.h: Declare _dl_profile_output, _dl_mcount_wrapper.
	Define _CALL_DL_FCT.
	* iconv/gconv.c: Use _CALL_DL_FCT to call function from dynamically
	loaded object.
	* iconv/gconv_db.c: Likewise.
	* iconv/skeleton.c: Likewise.
	* nss/getXXbyYY_r.c: Likewise.
	* nss/getXXent_r.c: Likewise.
	* nss/nsswitch.c: Likewise.
This commit is contained in:
Ulrich Drepper
1998-06-18 16:51:12 +00:00
parent 2827300fbe
commit 5ad49c0707
15 changed files with 159 additions and 24 deletions

View File

@ -101,9 +101,27 @@ _dl_open (const char *file, int mode)
magic ward. */
asm ("" : "=r" (reloc) : "0" (reloc));
(*reloc) (l, _dl_object_relocation_scope (l),
((mode & RTLD_BINDING_MASK) == RTLD_LAZY
|| _dl_profile != NULL), _dl_profile != NULL);
#ifdef PIC
if (_dl_profile != NULL)
{
/* If this here is the shared object which we want to profile
make sure the profile is started. We can find out whether
this is necessary or not by observing the `_dl_profile_map'
variable. If was NULL but is not NULL afterwars we must
start the profiling. */
struct link_map *old_profile_map = _dl_profile_map;
(*reloc) (l, _dl_object_relocation_scope (l), 1, 1);
if (old_profile_map == NULL && _dl_profile_map != NULL)
/* We must prepare the profiling. */
_dl_start_profile (_dl_profile_map, _dl_profile_output);
}
else
#endif
(*reloc) (l, _dl_object_relocation_scope (l),
(mode & RTLD_BINDING_MASK) == RTLD_LAZY, 0);
*_dl_global_scope_end = NULL;
}