mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-11 07:40:05 +00:00
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Remove
special case for dl_rtld_map in R_PPC64_RELATIVE; it's harmless to repeat it and avoids the test for the common case. Clean up and fix calculations for TLS relocs. * sysdeps/powerpc/powerpc64/dl-tls.h: Moved to ... * sysdeps/powerpc/dl-tls.h: ... here. (TLS_TP_OFFSET): New macro. * sunrpc/svc_udp.c (svcudp_recv): Add a cast to last change.
This commit is contained in:
parent
63c9fb5c4b
commit
a6963e69b5
13
ChangeLog
13
ChangeLog
@ -1,3 +1,16 @@
|
||||
2003-02-27 Roland McGrath <roland@redhat.com>
|
||||
|
||||
* sysdeps/powerpc/powerpc64/dl-machine.h (elf_machine_rela): Remove
|
||||
special case for dl_rtld_map in R_PPC64_RELATIVE; it's harmless to
|
||||
repeat it and avoids the test for the common case.
|
||||
Clean up and fix calculations for TLS relocs.
|
||||
|
||||
* sysdeps/powerpc/powerpc64/dl-tls.h: Moved to ...
|
||||
* sysdeps/powerpc/dl-tls.h: ... here.
|
||||
(TLS_TP_OFFSET): New macro.
|
||||
|
||||
* sunrpc/svc_udp.c (svcudp_recv): Add a cast to last change.
|
||||
|
||||
2003-02-27 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* sysdeps/i386/fpu/libm-test-ulps: Increase ULPs for yn due to
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Thread-local storage handling in the ELF dynamic linker. PowerPC64 version.
|
||||
/* Thread-local storage handling in the ELF dynamic linker. PowerPC version.
|
||||
Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
This file is part of the GNU C Library.
|
||||
|
||||
@ -30,6 +30,9 @@ typedef struct
|
||||
|
||||
extern void *__tls_get_addr (tls_index *ti);
|
||||
|
||||
/* The thread pointer points 0x7000 past the first static TLS block. */
|
||||
# define TLS_TP_OFFSET 0x7000
|
||||
|
||||
/* Dynamic thread vector pointers point 0x8000 past the start of each
|
||||
TLS block. */
|
||||
# define TLS_DTV_OFFSET 0x8000
|
@ -560,20 +560,10 @@ elf_machine_rela (struct link_map *map,
|
||||
Elf64_Addr value, raw_value;
|
||||
#ifndef RTLD_BOOTSTRAP
|
||||
const Elf64_Sym *const refsym = sym;
|
||||
/* 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
|
||||
cannot be done when compiling rtld.c (i.e. #ifdef RTLD_BOOTSTRAP)
|
||||
because rtld.c contains the common defn for _dl_rtld_map, which is
|
||||
incompatible with a weak decl in the same file. */
|
||||
weak_extern (GL(dl_rtld_map));
|
||||
#endif
|
||||
|
||||
if (r_type == R_PPC64_RELATIVE)
|
||||
{
|
||||
#ifndef RTLD_BOOTSTRAP
|
||||
/* Already done in dynamic linker. */
|
||||
if (map != &GL(dl_rtld_map))
|
||||
#endif
|
||||
*reloc_addr = map->l_addr + reloc->r_addend;
|
||||
return;
|
||||
}
|
||||
@ -581,29 +571,13 @@ elf_machine_rela (struct link_map *map,
|
||||
if (r_type == R_PPC64_NONE)
|
||||
return;
|
||||
|
||||
value = 0;
|
||||
raw_value = 0;
|
||||
|
||||
#if defined USE_TLS && !defined RTLD_BOOTSTRAP
|
||||
sym_map = RESOLVE_MAP (&sym, version, r_type);
|
||||
raw_value = value = reloc->r_addend;
|
||||
value = raw_value = reloc->r_addend;
|
||||
if (sym_map)
|
||||
if (sym)
|
||||
{
|
||||
raw_value += sym->st_value;
|
||||
value = raw_value + sym_map->l_addr;
|
||||
}
|
||||
#else
|
||||
sym_map = RESOLVE_MAP (&sym, version, r_type);
|
||||
if (sym_map)
|
||||
{
|
||||
if (sym)
|
||||
{
|
||||
raw_value = sym->st_value + sym_map->l_addr;
|
||||
}
|
||||
value = raw_value + reloc->r_addend;
|
||||
}
|
||||
#endif
|
||||
|
||||
switch (r_type)
|
||||
{
|
||||
@ -620,22 +594,22 @@ elf_machine_rela (struct link_map *map,
|
||||
*reloc_addr = 1;
|
||||
#else
|
||||
/* Get the information from the link map returned by the
|
||||
resolv function. */
|
||||
resolve function. */
|
||||
if (sym_map != NULL)
|
||||
{
|
||||
*reloc_addr = sym_map->l_tls_modid;
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
|
||||
case R_PPC64_TPREL64:
|
||||
#ifdef RTLD_BOOTSTRAP
|
||||
*reloc_addr = raw_value + map->l_tls_offset - 0x7010;
|
||||
*reloc_addr = (sym_map->l_tls_offset - TLS_TCB_SIZE
|
||||
+ raw_value - TLS_TP_OFFSET);
|
||||
#else
|
||||
if (sym_map)
|
||||
{
|
||||
CHECK_STATIC_TLS (map, sym_map);
|
||||
*reloc_addr = raw_value + sym_map->l_tls_offset - 0x7010;
|
||||
*reloc_addr = (sym_map->l_tls_offset - TLS_TCB_SIZE
|
||||
+ raw_value - TLS_TP_OFFSET);
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
@ -644,7 +618,7 @@ elf_machine_rela (struct link_map *map,
|
||||
#ifndef RTLD_BOOTSTRAP
|
||||
/* During relocation all TLS symbols are defined and used.
|
||||
Therefore the offset is already correct. */
|
||||
*reloc_addr = raw_value - 0x8000;
|
||||
*reloc_addr = raw_value - TLS_DTV_OFFSET;
|
||||
#endif
|
||||
return;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user