mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
Update.
2001-08-30 Jakub Jelinek <jakub@redhat.com> * sysdeps/alpha/dl-machine.h (elf_machine_rela): Don't handle R_ALPHA_RELATIVE if RTLD_BOOTSTRAP and HAVE_Z_COMBRELOC. Only check for rtld map if RTLD_BOOTSTRAP nor HAVE_Z_COMBRELOC is defined. * sysdeps/i386/dl-machine.h (elf_machine_rel): Similarly. * sysdeps/ia64/dl-machine.h (elf_machine_rel): Similarly. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rel): Similarly. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rel): Similarly.
This commit is contained in:
parent
628880cb78
commit
ee0cb67ec2
6 changed files with 35 additions and 19 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2001-08-30 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/alpha/dl-machine.h (elf_machine_rela): Don't handle
|
||||||
|
R_ALPHA_RELATIVE if RTLD_BOOTSTRAP and HAVE_Z_COMBRELOC. Only
|
||||||
|
check for rtld map if RTLD_BOOTSTRAP nor HAVE_Z_COMBRELOC is defined.
|
||||||
|
* sysdeps/i386/dl-machine.h (elf_machine_rel): Similarly.
|
||||||
|
* sysdeps/ia64/dl-machine.h (elf_machine_rel): Similarly.
|
||||||
|
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rel): Similarly.
|
||||||
|
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rel): Similarly.
|
||||||
|
|
||||||
2001-08-30 Ulrich Drepper <drepper@redhat.com>
|
2001-08-30 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* sysdeps/alpha/fpu/libm-test-ulps: Adjust j0 ULPs.
|
* sysdeps/alpha/fpu/libm-test-ulps: Adjust j0 ULPs.
|
||||||
|
|
|
@ -468,7 +468,7 @@ elf_machine_rela (struct link_map *map,
|
||||||
{
|
{
|
||||||
unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
|
unsigned long int const r_type = ELF64_R_TYPE (reloc->r_info);
|
||||||
|
|
||||||
#ifndef RTLD_BOOTSTRAP
|
#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
|
||||||
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
|
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
|
||||||
reference weak so static programs can still link. This declaration
|
reference weak so static programs can still link. This declaration
|
||||||
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
|
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
|
||||||
|
@ -480,12 +480,13 @@ elf_machine_rela (struct link_map *map,
|
||||||
/* We cannot use a switch here because we cannot locate the switch
|
/* We cannot use a switch here because we cannot locate the switch
|
||||||
jump table until we've self-relocated. */
|
jump table until we've self-relocated. */
|
||||||
|
|
||||||
|
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
||||||
if (__builtin_expect (r_type == R_ALPHA_RELATIVE, 0))
|
if (__builtin_expect (r_type == R_ALPHA_RELATIVE, 0))
|
||||||
{
|
{
|
||||||
#ifndef RTLD_BOOTSTRAP
|
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
|
||||||
/* Already done in dynamic linker. */
|
/* Already done in dynamic linker. */
|
||||||
if (map != &_dl_rtld_map)
|
if (map != &_dl_rtld_map)
|
||||||
#endif
|
# endif
|
||||||
{
|
{
|
||||||
/* XXX Make some timings. Maybe it's preverable to test for
|
/* XXX Make some timings. Maybe it's preverable to test for
|
||||||
unaligned access and only do it the complex way if necessary. */
|
unaligned access and only do it the complex way if necessary. */
|
||||||
|
@ -500,11 +501,12 @@ elf_machine_rela (struct link_map *map,
|
||||||
memcpy (reloc_addr_1, &reloc_addr_val, 8);
|
memcpy (reloc_addr_1, &reloc_addr_val, 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef RTLD_BOOTSTRAP
|
# ifndef RTLD_BOOTSTRAP
|
||||||
else if (__builtin_expect (r_type == R_ALPHA_NONE, 0))
|
else if (__builtin_expect (r_type == R_ALPHA_NONE, 0))
|
||||||
return;
|
return;
|
||||||
#endif
|
# endif
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
Elf64_Addr loadbase, sym_value;
|
Elf64_Addr loadbase, sym_value;
|
||||||
|
|
||||||
|
|
|
@ -308,7 +308,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
||||||
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
||||||
if (__builtin_expect (r_type == R_386_RELATIVE, 0))
|
if (__builtin_expect (r_type == R_386_RELATIVE, 0))
|
||||||
{
|
{
|
||||||
# ifndef RTLD_BOOTSTRAP
|
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
|
||||||
/* This is defined in rtld.c, but nowhere in the static libc.a;
|
/* This is defined in rtld.c, but nowhere in the static libc.a;
|
||||||
make the reference weak so static programs can still link.
|
make the reference weak so static programs can still link.
|
||||||
This declaration cannot be done when compiling rtld.c
|
This declaration cannot be done when compiling rtld.c
|
||||||
|
|
|
@ -508,7 +508,7 @@ elf_machine_rela (struct link_map *map,
|
||||||
const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info);
|
const unsigned long int r_type = ELF64_R_TYPE (reloc->r_info);
|
||||||
Elf64_Addr value;
|
Elf64_Addr value;
|
||||||
|
|
||||||
#ifndef RTLD_BOOTSTRAP
|
#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
|
||||||
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
|
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
|
||||||
reference weak so static programs can still link. This declaration
|
reference weak so static programs can still link. This declaration
|
||||||
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
|
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
|
||||||
|
@ -520,28 +520,28 @@ elf_machine_rela (struct link_map *map,
|
||||||
/* We cannot use a switch here because we cannot locate the switch
|
/* We cannot use a switch here because we cannot locate the switch
|
||||||
jump table until we've self-relocated. */
|
jump table until we've self-relocated. */
|
||||||
|
|
||||||
|
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
||||||
if (__builtin_expect (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_REL64LSB),
|
if (__builtin_expect (R_IA64_TYPE (r_type) == R_IA64_TYPE (R_IA64_REL64LSB),
|
||||||
0))
|
0))
|
||||||
{
|
{
|
||||||
assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB);
|
assert (ELF64_R_TYPE (reloc->r_info) == R_IA64_REL64LSB);
|
||||||
value = *reloc_addr;
|
value = *reloc_addr;
|
||||||
#ifndef RTLD_BOOTSTRAP
|
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
|
||||||
/* Already done in dynamic linker. */
|
/* Already done in dynamic linker. */
|
||||||
if (map != &_dl_rtld_map)
|
if (map != &_dl_rtld_map)
|
||||||
#endif
|
# endif
|
||||||
value += map->l_addr;
|
value += map->l_addr;
|
||||||
}
|
}
|
||||||
#ifndef RTLD_BOOTSTRAP
|
# ifndef RTLD_BOOTSTRAP
|
||||||
else if (r_type == R_IA64_NONE)
|
else if (r_type == R_IA64_NONE)
|
||||||
return;
|
return;
|
||||||
#endif
|
# endif
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
struct link_map *sym_map;
|
struct link_map *sym_map;
|
||||||
|
|
||||||
/*
|
/* RESOLVE_MAP() will return NULL if it fail to locate the symbol. */
|
||||||
* RESOLVE_MAP() will return NULL if it fail to locate the symbol
|
|
||||||
*/
|
|
||||||
if ((sym_map = RESOLVE_MAP (&sym, version, r_type)))
|
if ((sym_map = RESOLVE_MAP (&sym, version, r_type)))
|
||||||
{
|
{
|
||||||
value = sym ? sym_map->l_addr + sym->st_value : 0;
|
value = sym ? sym_map->l_addr + sym->st_value : 0;
|
||||||
|
|
|
@ -346,7 +346,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||||
{
|
{
|
||||||
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
||||||
|
|
||||||
#ifndef RTLD_BOOTSTRAP
|
#if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
|
||||||
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
|
/* This is defined in rtld.c, but nowhere in the static libc.a; make the
|
||||||
reference weak so static programs can still link. This declaration
|
reference weak so static programs can still link. This declaration
|
||||||
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
|
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
|
||||||
|
@ -355,14 +355,16 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||||
weak_extern (_dl_rtld_map);
|
weak_extern (_dl_rtld_map);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if !define RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
||||||
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
|
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
|
||||||
{
|
{
|
||||||
#ifndef RTLD_BOOTSTRAP
|
# if !defined RTLD_BOOTSTRAP && !defined HAVE_Z_COMBRELOC
|
||||||
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
|
if (map != &_dl_rtld_map) /* Already done in rtld itself. */
|
||||||
#endif
|
# endif
|
||||||
*reloc_addr += map->l_addr + reloc->r_addend;
|
*reloc_addr += map->l_addr + reloc->r_addend;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#ifndef RTLD_BOOTSTRAP
|
#ifndef RTLD_BOOTSTRAP
|
||||||
const Elf32_Sym *const refsym = sym;
|
const Elf32_Sym *const refsym = sym;
|
||||||
|
|
|
@ -199,13 +199,15 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
||||||
{
|
{
|
||||||
const unsigned long int r_type = ELF64_R_TYPE_ID (reloc->r_info);
|
const unsigned long int r_type = ELF64_R_TYPE_ID (reloc->r_info);
|
||||||
|
|
||||||
|
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
||||||
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
|
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
|
||||||
*reloc_addr = map->l_addr + reloc->r_addend;
|
*reloc_addr = map->l_addr + reloc->r_addend;
|
||||||
#ifndef RTLD_BOOTSTRAP
|
# ifndef RTLD_BOOTSTRAP
|
||||||
else if (r_type == R_SPARC_NONE) /* Who is Wilbur? */
|
else if (r_type == R_SPARC_NONE) /* Who is Wilbur? */
|
||||||
return;
|
return;
|
||||||
#endif
|
# endif
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
#ifndef RTLD_BOOTSTRAP
|
#ifndef RTLD_BOOTSTRAP
|
||||||
const Elf64_Sym *const refsym = sym;
|
const Elf64_Sym *const refsym = sym;
|
||||||
|
|
Loading…
Add table
Reference in a new issue