aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-profile.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-01-31 03:41:25 +0000
committerUlrich Drepper <drepper@redhat.com>2002-01-31 03:41:25 +0000
commitd6b5d570a3255d8dc80e07c3674594574cd98fe7 (patch)
tree36e05b0d065614559820d2a4f43bb1076ea5cfa1 /elf/dl-profile.c
parent1b4575aefaaa43adfed4658f7d66de587f12120e (diff)
downloadglibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.zip
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.gz
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.bz2
Update.
2002-01-30 Ulrich Drepper <drepper@redhat.com> * Versions.def [ld]: Add GLIBC_2.3. * elf/dl-addr.c: Move global variables for SHARED code in struct _rtld_global. Export this struct, remove all exports for the signal variables. * elf/dl-close.c: Likewise. * elf/dl-conflict.c: Likewise. * elf/dl-debug.c: Likewise. * elf/dl-deps.c: Likewise. * elf/dl-dst.h: Likewise. * elf/dl-error.c: Likewise. * elf/dl-fini.c: Likewise. * elf/dl-init.c: Likewise. * elf/dl-iteratephdr.c: Likewise. * elf/dl-libc.c: Likewise. * elf/dl-load.c: Likewise. * elf/dl-lookup.c: Likewise. * elf/dl-minimal.c: Likewise. * elf/dl-object.c: Likewise. * elf/dl-open.c: Likewise. * elf/dl-profile.c: Likewise. * elf/dl-profstub.c: Likewise. * elf/dl-reloc.c: Likewise. * elf/dl-runtime.c: Likewise. * elf/dl-support.c: Likewise. * elf/dl-sym.c: Likewise. * elf/dl-version.c: Likewise. * elf/do-lookup.h: Likewise. * elf/do-rel.h: Likewise. * elf/dynamic-link.h: Likewise. * elf/rtld.c: Likewise. * sysdeps/generic/dl-cache.c: Likewise. * sysdeps/generic/dl-sysdep.c: Likewise. * sysdeps/generic/ldsodefs.h: Likewise. * sysdeps/generic/libc-start.c: Likewise. * sysdeps/i386/dl-machine.h: Likewise. * sysdeps/ia64/dl-fptr.c: Likewise. * sysdeps/ia64/dl-machine.h: Likewise. * sysdeps/unix/sysv/linux/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/dl-origin.c: Likewise. * sysdeps/unix/sysv/linux/dl-osinfo.h: Likewise. * sysdeps/unix/sysv/linux/getclktck.c: Likewise. * sysdeps/unix/sysv/linux/getpagesize.c: Likewise. * sysdeps/unix/sysv/linux/i386/dl-librecon.h: Likewise. * sysdeps/unix/sysv/linux/ia64/dl-static.c: Likewise. * sysdeps/unix/sysv/linux/ia64/getpagesize.c: Likewise. * malloc/thread-m.h: Spinlock definitions for x86/x86_64.
Diffstat (limited to 'elf/dl-profile.c')
-rw-r--r--elf/dl-profile.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/elf/dl-profile.c b/elf/dl-profile.c
index 9f16a93..6abdb1b 100644
--- a/elf/dl-profile.c
+++ b/elf/dl-profile.c
@@ -1,5 +1,5 @@
/* Profiling of shared libraries.
- Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright (C) 1997,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
Based on the BSD mcount implementation.
@@ -196,9 +196,9 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
for (ph = map->l_phdr; ph < &map->l_phdr[map->l_phnum]; ++ph)
if (ph->p_type == PT_LOAD && (ph->p_flags & PF_X))
{
- ElfW(Addr) start = (ph->p_vaddr & ~(_dl_pagesize - 1));
- ElfW(Addr) end = ((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1)
- & ~(_dl_pagesize - 1));
+ ElfW(Addr) start = (ph->p_vaddr & ~(GL(dl_pagesize) - 1));
+ ElfW(Addr) end = ((ph->p_vaddr + ph->p_memsz + GL(dl_pagesize) - 1)
+ & ~(GL(dl_pagesize) - 1));
if (start < mapstart)
mapstart = start;
@@ -250,11 +250,11 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
/* First determine the output name. We write in the directory
OUTPUT_DIR and the name is composed from the shared objects
soname (or the file name) and the ending ".profile". */
- filename = (char *) alloca (strlen (output_dir) + 1 + strlen (_dl_profile)
+ filename = (char *) alloca (strlen (output_dir) + 1 + strlen (GL(dl_profile))
+ sizeof ".profile");
cp = __stpcpy (filename, output_dir);
*cp++ = '/';
- __stpcpy (__stpcpy (cp, _dl_profile), ".profile");
+ __stpcpy (__stpcpy (cp, GL(dl_profile)), ".profile");
#ifdef O_NOFOLLOW
# define EXTRA_FLAGS | O_NOFOLLOW
@@ -287,11 +287,11 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
if (st.st_size == 0)
{
/* We have to create the file. */
- char buf[_dl_pagesize];
+ char buf[GL(dl_pagesize)];
- memset (buf, '\0', _dl_pagesize);
+ memset (buf, '\0', GL(dl_pagesize));
- if (__lseek (fd, expected_size & ~(_dl_pagesize - 1), SEEK_SET) == -1)
+ if (__lseek (fd, expected_size & ~(GL(dl_pagesize) - 1), SEEK_SET) == -1)
{
char buf[400];
int errnum;
@@ -304,7 +304,8 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
}
if (TEMP_FAILURE_RETRY (__libc_write (fd, buf, (expected_size
- & (_dl_pagesize - 1))))
+ & (GL(dl_pagesize)
+ - 1))))
< 0)
goto cannot_create;
}
@@ -317,7 +318,7 @@ _dl_start_profile (struct link_map *map, const char *output_dir)
__munmap ((void *) addr, expected_size);
_dl_error_printf ("%s: file is no correct profile data file for `%s'\n",
- filename, _dl_profile);
+ filename, GL(dl_profile));
return;
}