mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-23 05:20:06 +00:00
d6b5d570a3
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.
67 lines
2.4 KiB
C
67 lines
2.4 KiB
C
/* Resolve conflicts against already prelinked libraries.
|
|
Copyright (C) 2001, 2002 Free Software Foundation, Inc.
|
|
This file is part of the GNU C Library.
|
|
Contributed by Jakub Jelinek <jakub@redhat.com>, 2001.
|
|
|
|
The GNU C Library is free software; you can redistribute it and/or
|
|
modify it under the terms of the GNU Library General Public License as
|
|
published by the Free Software Foundation; either version 2 of the
|
|
License, or (at your option) any later version.
|
|
|
|
The GNU C Library is distributed in the hope that it will be useful,
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Library General Public License for more details.
|
|
|
|
You should have received a copy of the GNU Library General Public
|
|
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
|
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
Boston, MA 02111-1307, USA. */
|
|
|
|
#include <errno.h>
|
|
#include <libintl.h>
|
|
#include <stdlib.h>
|
|
#include <unistd.h>
|
|
#include <ldsodefs.h>
|
|
#include <sys/mman.h>
|
|
#include <sys/param.h>
|
|
#include <sys/types.h>
|
|
#include "dynamic-link.h"
|
|
|
|
|
|
void
|
|
_dl_resolve_conflicts (struct link_map *l, ElfW(Rela) *conflict,
|
|
ElfW(Rela) *conflictend)
|
|
{
|
|
if (__builtin_expect (GL(dl_debug_mask) & DL_DEBUG_RELOC, 0))
|
|
_dl_printf ("\nconflict processing: %s\n",
|
|
l->l_name[0] ? l->l_name : _dl_argv[0]);
|
|
|
|
{
|
|
/* Do the conflict relocation of the object and library GOT and other
|
|
data. */
|
|
|
|
/* This macro is used as a callback from the ELF_DYNAMIC_RELOCATE code. */
|
|
#define RESOLVE_MAP(ref, version, flags) (*ref = NULL, 0)
|
|
#define RESOLVE(ref, version, flags) (*ref = NULL, 0)
|
|
#define RESOLVE_CONFLICT_FIND_MAP(map, r_offset) \
|
|
do { \
|
|
while ((resolve_conflict_map->l_map_end < (ElfW(Addr)) (r_offset)) \
|
|
|| (resolve_conflict_map->l_map_start > (ElfW(Addr)) (r_offset))) \
|
|
resolve_conflict_map = resolve_conflict_map->l_next; \
|
|
\
|
|
(map) = resolve_conflict_map; \
|
|
} while (0)
|
|
|
|
struct link_map *resolve_conflict_map __attribute__ ((__unused__))
|
|
= GL(dl_loaded);
|
|
|
|
#include "dynamic-link.h"
|
|
|
|
GL(dl_num_cache_relocations) += conflictend - conflict;
|
|
|
|
for (; conflict < conflictend; ++conflict)
|
|
elf_machine_rela (l, conflict, NULL, NULL, (void *) conflict->r_offset);
|
|
}
|
|
}
|