diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:16:25 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:16:25 +0000 |
commit | 8d59503b977070aaa4e504e8d6dcb7da3711893e (patch) | |
tree | 8272c9c2cce43afa4fe4d8d92c269a6435242661 /elf/get-dynamic-info.h | |
parent | 76a7dc16fab8853ef9230447fa98c70a3619dc6d (diff) | |
parent | bcea9593527d90b9f9ff3817e3fbf0fbc3d01fa7 (diff) |
Merge commit 'refs/top-bases/t/gsync-libc-merge' into t/gsync-libc-merge
Diffstat (limited to 'elf/get-dynamic-info.h')
-rw-r--r-- | elf/get-dynamic-info.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/elf/get-dynamic-info.h b/elf/get-dynamic-info.h index 4cf18a46cc..4b1ea7c407 100644 --- a/elf/get-dynamic-info.h +++ b/elf/get-dynamic-info.h @@ -1,5 +1,5 @@ /* Read the dynamic section at DYN and fill in INFO with indices DT_*. - Copyright (C) 2012-2016 Free Software Foundation, Inc. + Copyright (C) 2012-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -16,8 +16,11 @@ License along with the GNU C Library; if not, see <http://www.gnu.org/licenses/>. */ +/* This file is included multiple times and therefore lacks a header + file inclusion guard. */ + #include <assert.h> -#include <libc-internal.h> +#include <libc-diag.h> #ifndef RESOLVE_MAP static @@ -35,7 +38,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) typedef Elf64_Xword d_tag_utype; #endif -#ifndef RTLD_BOOTSTRAP +#if !defined RTLD_BOOTSTRAP && !defined STATIC_PIE_BOOTSTRAP if (dyn == NULL) return; #endif @@ -107,8 +110,7 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) # endif ADJUST_DYN_INFO (DT_JMPREL); ADJUST_DYN_INFO (VERSYMIDX (DT_VERSYM)); - ADJUST_DYN_INFO (DT_ADDRTAGIDX (DT_GNU_HASH) + DT_NUM + DT_THISPROCNUM - + DT_VERSIONTAGNUM + DT_EXTRANUM + DT_VALNUM); + ADJUST_DYN_INFO (ADDRIDX (DT_GNU_HASH)); # undef ADJUST_DYN_INFO assert (cnt <= DL_RO_DYN_TEMP_CNT); } @@ -136,9 +138,11 @@ elf_get_dynamic_info (struct link_map *l, ElfW(Dyn) *temp) /* Only the bind now flags are allowed. */ assert (info[VERSYMIDX (DT_FLAGS_1)] == NULL || (info[VERSYMIDX (DT_FLAGS_1)]->d_un.d_val & ~DF_1_NOW) == 0); + /* Flags must not be set for ld.so. */ assert (info[DT_FLAGS] == NULL || (info[DT_FLAGS]->d_un.d_val & ~DF_BIND_NOW) == 0); - /* Flags must not be set for ld.so. */ +#endif +#if defined RTLD_BOOTSTRAP || defined STATIC_PIE_BOOTSTRAP assert (info[DT_RUNPATH] == NULL); assert (info[DT_RPATH] == NULL); #else |