From 8e27f45e05625aab0797d8dc1afb5b47204cb20a Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Thu, 24 Apr 2003 17:11:08 +0000 Subject: * elf/dl-reloc.c (allocate_static_tls): Rename to... (_dl_allocate_static_tls): ... this function. No longer static. (CHECK_STATIC_TLS): Adjust. * sysdeps/generic/ldsodefs.h (_dl_allocate_static_tls): New prototype. * sysdeps/powerpc/powerpc32/dl-machine.h (__process_machine_rela): Add SYM_MAP argument. (elf_machine_rela): Adjust caller. Declare SYM_MAP unconditionally. Check if SYM_MAP != NULL for R_PPC_DTPREL32. Only handle 32-bit TLS relocs here. #ifdef out relocs which never appear in .gnu.conflict section from dl-conflict.c processing. * sysdeps/powerpc/powerpc32/dl-machine.c (__process_machine_rela): Add SYM_MAP argument. Handle 16-bit TLS relocs here. * sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela): #ifdef out relocs which never appear in .gnu.conflict section from dl-conflict.c processing. * sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/x86_64/dl-machine.h (elf_machine_rela): Likewise. * sysdeps/i386/dl-machine.h (elf_machine_rela): Likewise. Use r_type in RESOLVE macro. --- sysdeps/i386/dl-machine.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sysdeps/i386/dl-machine.h') diff --git a/sysdeps/i386/dl-machine.h b/sysdeps/i386/dl-machine.h index fa5076e3e5..07c880a160 100644 --- a/sysdeps/i386/dl-machine.h +++ b/sysdeps/i386/dl-machine.h @@ -521,7 +521,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type); Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value; # else - Elf32_Addr value = RESOLVE (&sym, version, ELF32_R_TYPE (reloc->r_info)); + Elf32_Addr value = RESOLVE (&sym, version, r_type); if (sym != NULL) value += sym->st_value; # endif @@ -533,11 +533,13 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, case R_386_32: *reloc_addr = value + reloc->r_addend; break; +# ifndef RESOLVE_CONFLICT_FIND_MAP + /* Not needed for dl-conflict.c. */ case R_386_PC32: *reloc_addr = (value + reloc->r_addend - (Elf32_Addr) reloc_addr); break; -# ifdef USE_TLS +# ifdef USE_TLS case R_386_TLS_DTPMOD32: /* Get the information from the link map returned by the resolv function. */ @@ -570,9 +572,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc, = (sym == NULL ? 0 : sym->st_value - sym_map->l_tls_offset) + reloc->r_addend; break; -# endif /* use TLS */ -# ifndef RESOLVE_CONFLICT_FIND_MAP - /* Not needed for dl-conflict.c. */ +# endif /* use TLS */ case R_386_COPY: if (sym == NULL) /* This can happen in trace mode if an object could not be -- cgit v1.2.3