aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-reloc.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-reloc.c
parent1b4575aefaaa43adfed4658f7d66de587f12120e (diff)
downloadglibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.gz
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.tar.bz2
glibc-d6b5d570a3255d8dc80e07c3674594574cd98fe7.zip
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-reloc.c')
-rw-r--r--elf/dl-reloc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/elf/dl-reloc.c b/elf/dl-reloc.c
index bfab6a2bda..a3ee153b84 100644
--- a/elf/dl-reloc.c
+++ b/elf/dl-reloc.c
@@ -27,10 +27,9 @@
#include <sys/types.h>
#include "dynamic-link.h"
-#ifdef SHARED
/* Statistics function. */
-unsigned long int _dl_num_cache_relocations;
-# define bump_num_cache_relocations() ++_dl_num_cache_relocations
+#ifdef SHARED
+# define bump_num_cache_relocations() ++GL(dl_num_cache_relocations)
#else
# define bump_num_cache_relocations() ((void) 0)
#endif
@@ -59,9 +58,10 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
&& __builtin_expect (l->l_info[DT_BIND_NOW] != NULL, 0))
lazy = 0;
- if (__builtin_expect (_dl_debug_mask & DL_DEBUG_RELOC, 0))
+ if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
_dl_printf ("\nrelocation processing: %s%s\n",
- l->l_name[0] ? l->l_name : _dl_argv[0], lazy ? " (lazy)" : "");
+ l->l_name[0] ? l->l_name : _dl_argv[0],
+ lazy ? " (lazy)" : "");
/* DT_TEXTREL is now in level 2 and might phase out at some time.
But we rewrite the DT_FLAGS entry to a DT_TEXTREL entry to make
@@ -77,10 +77,10 @@ _dl_relocate_object (struct link_map *l, struct r_scope_elem *scope[],
struct textrels *newp;
newp = (struct textrels *) alloca (sizeof (*newp));
- newp->len = (((ph->p_vaddr + ph->p_memsz + _dl_pagesize - 1)
- & ~(_dl_pagesize - 1))
- - (ph->p_vaddr & ~(_dl_pagesize - 1)));
- newp->start = ((ph->p_vaddr & ~(_dl_pagesize - 1))
+ newp->len = (((ph->p_vaddr + ph->p_memsz + GL(dl_pagesize) - 1)
+ & ~(GL(dl_pagesize) - 1))
+ - (ph->p_vaddr & ~(GL(dl_pagesize) - 1)));
+ newp->start = ((ph->p_vaddr & ~(GL(dl_pagesize) - 1))
+ (caddr_t) l->l_addr);
if (__mprotect (newp->start, newp->len, PROT_READ|PROT_WRITE) < 0)