diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-01-13 17:58:00 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2022-02-10 09:16:12 -0300 |
commit | 6628c742b2c16e785d3c884d9deeda5adb30ca12 (patch) | |
tree | 493580e40aef171896584e1d3d32bbe14c15140b /sysdeps/s390/s390-64 | |
parent | 8c8510ab2790039e58995ef3a22309582413d3ff (diff) | |
download | glibc-6628c742b2c16e785d3c884d9deeda5adb30ca12.tar.gz glibc-6628c742b2c16e785d3c884d9deeda5adb30ca12.tar.xz glibc-6628c742b2c16e785d3c884d9deeda5adb30ca12.zip |
elf: Remove prelink support
Prelinked binaries and libraries still work, the dynamic tags DT_GNU_PRELINKED, DT_GNU_LIBLIST, DT_GNU_CONFLICT just ignored (meaning the process is reallocated as default). The loader environment variable TRACE_PRELINKING is also removed, since it used solely on prelink. Checked on x86_64-linux-gnu, i686-linux-gnu, and aarch64-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'sysdeps/s390/s390-64')
-rw-r--r-- | sysdeps/s390/s390-64/dl-machine.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h index 9c0d247e60..4bd97f5645 100644 --- a/sysdeps/s390/s390-64/dl-machine.h +++ b/sysdeps/s390/s390-64/dl-machine.h @@ -299,7 +299,7 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], return; else { -#if !defined RTLD_BOOTSTRAP && !defined RESOLVE_CONFLICT_FIND_MAP +#if !defined RTLD_BOOTSTRAP /* Only needed for R_390_COPY below. */ const Elf64_Sym *const refsym = sym; #endif @@ -327,34 +327,33 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], *reloc_addr = value + reloc->r_addend; break; -#ifndef RESOLVE_CONFLICT_FIND_MAP case R_390_TLS_DTPMOD: -# ifdef RTLD_BOOTSTRAP +#ifdef RTLD_BOOTSTRAP /* During startup the dynamic linker is always the module with index 1. XXX If this relocation is necessary move before RESOLVE call. */ *reloc_addr = 1; -# else +#else /* Get the information from the link map returned by the resolv function. */ if (sym_map != NULL) *reloc_addr = sym_map->l_tls_modid; -# endif +#endif break; case R_390_TLS_DTPOFF: -# ifndef RTLD_BOOTSTRAP +#ifndef RTLD_BOOTSTRAP /* During relocation all TLS symbols are defined and used. Therefore the offset is already correct. */ if (sym != NULL) *reloc_addr = sym->st_value + reloc->r_addend; -# endif +#endif break; case R_390_TLS_TPOFF: /* The offset is negative, forward from the thread pointer. */ -# ifdef RTLD_BOOTSTRAP +#ifdef RTLD_BOOTSTRAP *reloc_addr = sym->st_value + reloc->r_addend - map->l_tls_offset; -# else +#else /* We know the offset of the object the symbol is contained in. It is a negative value which will be added to the thread pointer. */ @@ -366,10 +365,8 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], } #endif break; -#endif /* use TLS */ #ifndef RTLD_BOOTSTRAP -# ifndef RESOLVE_CONFLICT_FIND_MAP /* Not needed for dl-conflict.c. */ case R_390_COPY: if (sym == NULL) @@ -390,7 +387,6 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], memcpy (reloc_addr_arg, (void *) value, MIN (sym->st_size, refsym->st_size)); break; -# endif case R_390_64: *reloc_addr = value + reloc->r_addend; break; @@ -403,7 +399,6 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], case R_390_8: *(char *) reloc_addr = value + reloc->r_addend; break; -# ifndef RESOLVE_CONFLICT_FIND_MAP case R_390_PC64: *reloc_addr = value +reloc->r_addend - (Elf64_Addr) reloc_addr; break; @@ -425,7 +420,6 @@ elf_machine_rela (struct link_map *map, struct r_scope_elem *scope[], break; case R_390_NONE: break; -# endif #endif #if !defined(RTLD_BOOTSTRAP) || defined(_NDEBUG) default: |