summaryrefslogtreecommitdiff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/Makefile11
-rw-r--r--elf/Versions23
-rw-r--r--elf/cache.c4
-rw-r--r--elf/dl-addr.c18
-rw-r--r--elf/dl-cache.c5
-rw-r--r--elf/dl-deps.c4
-rw-r--r--elf/dl-hwcaps.c9
-rw-r--r--elf/dl-open.c43
-rw-r--r--elf/dl-runtime.c6
-rw-r--r--elf/dl-support.c10
-rw-r--r--elf/dl-sym.c14
-rw-r--r--elf/dl-sysdep.c2
-rw-r--r--elf/elf.h137
-rw-r--r--elf/pldd.c5
-rw-r--r--elf/rtld.c4
-rw-r--r--elf/setup-vdso.h2
-rw-r--r--elf/tlsdeschtab.h4
-rw-r--r--elf/tst-stackguard1.c1
18 files changed, 199 insertions, 103 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 6d4b365fbb..9477a4d96b 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -66,7 +66,7 @@ endif
ifeq (yes,$(build-shared))
extra-objs = $(all-rtld-routines:%=%.os) soinit.os sofini.os interp.os
generated += librtld.os dl-allobjs.os ld.so ldd
-install-others = $(inst_slibdir)/$(rtld-installed-name)
+install-others = $(inst_rtlddir)/$(rtld-installed-name)
install-bin-script = ldd
endif
@@ -340,7 +340,7 @@ $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
| $(AWK) '($$7 ~ /^UND(|EF)$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
# interp.c exists just to get this string into the libraries.
-CFLAGS-interp.c = -D'RUNTIME_LINKER="$(slibdir)/$(rtld-installed-name)"' \
+CFLAGS-interp.c = -D'RUNTIME_LINKER="$(rtlddir)/$(rtld-installed-name)"' \
-DNOT_IN_libc=1
$(objpfx)interp.os: $(common-objpfx)config.make
@@ -372,18 +372,19 @@ $(inst_slibdir)/$(rtld-version-installed-name): $(objpfx)ld.so $(+force)
$(make-target-directory)
$(do-install-program)
-$(inst_slibdir)/$(rtld-installed-name): \
+$(inst_rtlddir)/$(rtld-installed-name): \
$(inst_slibdir)/$(rtld-version-installed-name) \
$(inst_slibdir)/libc-$(version).so
+ $(make-target-directory)
$(make-shlib-link)
# Special target called by parent to install just the dynamic linker.
.PHONY: ldso_install
-ldso_install: $(inst_slibdir)/$(rtld-installed-name)
+ldso_install: $(inst_rtlddir)/$(rtld-installed-name)
endif
-common-ldd-rewrite = -e 's%@RTLD@%$(slibdir)/$(rtld-installed-name)%g' \
+common-ldd-rewrite = -e 's%@RTLD@%$(rtlddir)/$(rtld-installed-name)%g' \
-e 's%@VERSION@%$(version)%g' \
-e 's|@PKGVERSION@|$(PKGVERSION)|g' \
-e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|g'
diff --git a/elf/Versions b/elf/Versions
index 87e27c5a7a..238399232d 100644
--- a/elf/Versions
+++ b/elf/Versions
@@ -1,7 +1,7 @@
libc {
GLIBC_2.0 {
%ifdef EXPORT_UNWIND_FIND_FDE
- __register_frame_info; __deregister_frame_info;
+ __deregister_frame_info; __register_frame_info;
%endif
}
GLIBC_2.1 {
@@ -13,23 +13,23 @@ libc {
}
%ifdef EXPORT_UNWIND_FIND_FDE
GCC_3.0 {
- __register_frame_info_bases; __deregister_frame_info_bases;
+ __deregister_frame_info_bases; __register_frame_info_bases;
__register_frame_info_table_bases; _Unwind_Find_FDE;
}
%endif
GLIBC_PRIVATE {
# functions used in other libraries
_dl_addr;
- _dl_sym; _dl_vsym;
_dl_open_hook;
- __libc_dlopen_mode; __libc_dlsym; __libc_dlclose;
+ _dl_sym; _dl_vsym;
+ __libc_dlclose; __libc_dlopen_mode; __libc_dlsym;
}
}
ld {
GLIBC_2.0 {
# Function from libc.so which must be shared with libc.
- calloc; free; malloc; realloc; __libc_memalign;
+ __libc_memalign; calloc; free; malloc; realloc;
_r_debug;
}
@@ -50,16 +50,15 @@ ld {
GLIBC_PRIVATE {
# Those are in the dynamic linker, but used by libc.so.
__libc_enable_secure;
- _dl_argv;
- _dl_out_of_memory;
- _dl_starting_up;
+ _dl_allocate_tls; _dl_allocate_tls_init;
+ _dl_argv; _dl_find_dso_for_object; _dl_get_tls_static_info;
+ _dl_deallocate_tls; _dl_make_stack_executable; _dl_out_of_memory;
+ _dl_rtld_di_serinfo; _dl_starting_up; _dl_tls_setup;
_rtld_global; _rtld_global_ro;
- _dl_allocate_tls; _dl_deallocate_tls;
- _dl_get_tls_static_info; _dl_allocate_tls_init;
- _dl_tls_setup; _dl_rtld_di_serinfo;
- _dl_make_stack_executable;
+
# Only here for gdb while a better method is developed.
_dl_debug_state;
+
# Pointer protection.
__pointer_chk_guard;
}
diff --git a/elf/cache.c b/elf/cache.c
index 9901952722..699550bb60 100644
--- a/elf/cache.c
+++ b/elf/cache.c
@@ -100,6 +100,10 @@ print_entry (const char *lib, int flag, unsigned int osversion,
case FLAG_AARCH64_LIB64:
fputs (",AArch64", stdout);
break;
+ /* Uses the ARM soft-float ABI. */
+ case FLAG_ARM_LIBSF:
+ fputs (",soft-float", stdout);
+ break;
case 0:
break;
default:
diff --git a/elf/dl-addr.c b/elf/dl-addr.c
index 91cc443439..a53346627f 100644
--- a/elf/dl-addr.c
+++ b/elf/dl-addr.c
@@ -130,18 +130,14 @@ _dl_addr (const void *address, Dl_info *info,
/* Protect against concurrent loads and unloads. */
__rtld_lock_lock_recursive (GL(dl_load_lock));
- /* Find the highest-addressed object that ADDRESS is not below. */
- for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
- for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l; l = l->l_next)
- if (addr >= l->l_map_start && addr < l->l_map_end
- && (l->l_contiguous || _dl_addr_inside_object (l, addr)))
- {
- determine_info (addr, l, info, mapp, symbolp);
- result = 1;
- goto out;
- }
+ struct link_map *l = _dl_find_dso_for_object (addr);
+
+ if (l)
+ {
+ determine_info (addr, l, info, mapp, symbolp);
+ result = 1;
+ }
- out:
__rtld_lock_unlock_recursive (GL(dl_load_lock));
return result;
diff --git a/elf/dl-cache.c b/elf/dl-cache.c
index 2c4bcc6cb9..030fdcaffe 100644
--- a/elf/dl-cache.c
+++ b/elf/dl-cache.c
@@ -172,8 +172,9 @@ _dl_cache_libcmp (const char *p1, const char *p2)
}
-/* Look up NAME in ld.so.cache and return the file name stored there,
- or null if none is found. */
+/* Look up NAME in ld.so.cache and return the file name stored there, or null
+ if none is found. The cache is loaded if it was not already. If loading
+ the cache previously failed there will be no more attempts to load it. */
const char *
internal_function
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index fe90df61b1..cd1c236b2e 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -155,9 +155,7 @@ _dl_map_object_deps (struct link_map *map,
const char *errstring;
const char *objname;
- auto inline void preload (struct link_map *map);
-
- inline void preload (struct link_map *map)
+ void preload (struct link_map *map)
{
known[nlist].done = 0;
known[nlist].map = map;
diff --git a/elf/dl-hwcaps.c b/elf/dl-hwcaps.c
index 3805949e8a..8d49383d76 100644
--- a/elf/dl-hwcaps.c
+++ b/elf/dl-hwcaps.c
@@ -42,7 +42,6 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
size_t cnt = platform != NULL;
size_t n, m;
size_t total;
- struct r_strlenpair *temp;
struct r_strlenpair *result;
struct r_strlenpair *rp;
char *cp;
@@ -52,7 +51,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
if ((masked & (1ULL << n)) != 0)
++cnt;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
/* The system-supplied DSO can contain a note of type 2, vendor "GNU".
This gives us a list of names to treat as fake hwcap bits. */
@@ -103,9 +102,9 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
++cnt;
/* Create temporary data structure to generate result table. */
- temp = (struct r_strlenpair *) alloca (cnt * sizeof (*temp));
+ struct r_strlenpair temp[cnt];
m = 0;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
if (dsocaps != NULL)
{
const ElfW(Word) mask = ((const ElfW(Word) *) dsocaps)[-1];
@@ -199,7 +198,7 @@ _dl_important_hwcaps (const char *platform, size_t platform_len, size_t *sz,
}
/* Fill in the information. This follows the following scheme
- (indeces from TEMP for four strings):
+ (indices from TEMP for four strings):
entry #0: 0, 1, 2, 3 binary: 1111
#1: 0, 1, 3 1101
#2: 0, 2, 3 1011
diff --git a/elf/dl-open.c b/elf/dl-open.c
index 385a6c1f35..201d95d1be 100644
--- a/elf/dl-open.c
+++ b/elf/dl-open.c
@@ -28,7 +28,6 @@
#include <sys/param.h>
#include <bits/libc-lock.h>
#include <ldsodefs.h>
-#include <bp-sym.h>
#include <caller.h>
#include <sysdep-cancel.h>
#include <tls.h>
@@ -43,7 +42,7 @@ extern ElfW(Addr) _dl_sysdep_start (void **start_argptr,
ElfW(Word) phnum,
ElfW(Addr) *user_entry,
ElfW(auxv_t) *auxv));
-weak_extern (BP_SYM (_dl_sysdep_start))
+weak_extern (_dl_sysdep_start)
extern int __libc_multiple_libcs; /* Defined in init-first.c. */
@@ -166,6 +165,29 @@ add_to_global (struct link_map *new)
return 0;
}
+/* Search link maps in all namespaces for the DSO that containes the object at
+ address ADDR. Returns the pointer to the link map of the matching DSO, or
+ NULL if a match is not found. */
+struct link_map *
+internal_function
+_dl_find_dso_for_object (const ElfW(Addr) addr)
+{
+ struct link_map *l;
+
+ /* Find the highest-addressed object that ADDR is not below. */
+ for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
+ for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
+ if (addr >= l->l_map_start && addr < l->l_map_end
+ && (l->l_contiguous
+ || _dl_addr_inside_object (l, (ElfW(Addr)) addr)))
+ {
+ assert (ns == l->l_ns);
+ return l;
+ }
+ return NULL;
+}
+rtld_hidden_def (_dl_find_dso_for_object);
+
static void
dl_open_worker (void *a)
{
@@ -195,20 +217,11 @@ dl_open_worker (void *a)
call_map = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
#endif
- struct link_map *l;
- for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
- for (l = GL(dl_ns)[ns]._ns_loaded; l != NULL; l = l->l_next)
- if (caller_dlopen >= (const void *) l->l_map_start
- && caller_dlopen < (const void *) l->l_map_end
- && (l->l_contiguous
- || _dl_addr_inside_object (l, (ElfW(Addr)) caller_dlopen)))
- {
- assert (ns == l->l_ns);
- call_map = l;
- goto found_caller;
- }
+ struct link_map *l = _dl_find_dso_for_object ((ElfW(Addr)) caller_dlopen);
+
+ if (l)
+ call_map = l;
- found_caller:
if (args->nsid == __LM_ID_CALLER)
{
#ifndef SHARED
diff --git a/elf/dl-runtime.c b/elf/dl-runtime.c
index 9ac2726102..828474838c 100644
--- a/elf/dl-runtime.c
+++ b/elf/dl-runtime.c
@@ -62,9 +62,7 @@ _dl_fixup (
# ifdef ELF_MACHINE_RUNTIME_FIXUP_ARGS
ELF_MACHINE_RUNTIME_FIXUP_ARGS,
# endif
- /* GKM FIXME: Fix trampoline to pass bounds so we can do
- without the `__unbounded' qualifier. */
- struct link_map *__unbounded l, ElfW(Word) reloc_arg)
+ struct link_map *l, ElfW(Word) reloc_arg)
{
const ElfW(Sym) *const symtab
= (const void *) D_PTR (l, l_info[DT_SYMTAB]);
@@ -150,7 +148,7 @@ _dl_fixup (
return elf_machine_fixup_plt (l, result, reloc, rel_addr, value);
}
-#if !defined PROF && !__BOUNDED_POINTERS__
+#ifndef PROF
DL_FIXUP_VALUE_TYPE
__attribute ((noinline)) ARCH_FIXUP_ATTRIBUTE
_dl_profile_fixup (
diff --git a/elf/dl-support.c b/elf/dl-support.c
index 507568784b..ad9b4c40b0 100644
--- a/elf/dl-support.c
+++ b/elf/dl-support.c
@@ -158,7 +158,7 @@ struct dl_scope_free_list *_dl_scope_free_list;
/* Needed for improved syscall handling on at least x86/Linux. */
uintptr_t _dl_sysinfo = DL_SYSINFO_DEFAULT;
#endif
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
/* Address of the ELF headers in the vsyscall page. */
const ElfW(Ehdr) *_dl_sysinfo_dso;
@@ -198,7 +198,8 @@ _dl_aux_init (ElfW(auxv_t) *av)
switch (av->a_type)
{
case AT_PAGESZ:
- GLRO(dl_pagesize) = av->a_un.a_val;
+ if (av->a_un.a_val != 0)
+ GLRO(dl_pagesize) = av->a_un.a_val;
break;
case AT_CLKTCK:
GLRO(dl_clktck) = av->a_un.a_val;
@@ -217,7 +218,7 @@ _dl_aux_init (ElfW(auxv_t) *av)
GL(dl_sysinfo) = av->a_un.a_val;
break;
#endif
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
case AT_SYSINFO_EHDR:
GL(dl_sysinfo_dso) = (void *) av->a_un.a_val;
break;
@@ -266,9 +267,6 @@ _dl_non_dynamic_init (void)
if (HP_TIMING_AVAIL)
HP_TIMING_NOW (_dl_cpuclock_offset);
- if (!_dl_pagesize)
- _dl_pagesize = __getpagesize ();
-
_dl_verbose = *(getenv ("LD_WARN") ?: "") == '\0' ? 0 : 1;
/* Set up the data structures for the system-supplied DSO early,
diff --git a/elf/dl-sym.c b/elf/dl-sym.c
index d2b4db7ec0..05de6c1c06 100644
--- a/elf/dl-sym.c
+++ b/elf/dl-sym.c
@@ -91,20 +91,10 @@ do_sym (void *handle, const char *name, void *who,
lookup_t result;
ElfW(Addr) caller = (ElfW(Addr)) who;
+ struct link_map *l = _dl_find_dso_for_object (caller);
/* If the address is not recognized the call comes from the main
program (we hope). */
- struct link_map *match = GL(dl_ns)[LM_ID_BASE]._ns_loaded;
-
- /* Find the highest-addressed object that CALLER is not below. */
- for (Lmid_t ns = 0; ns < GL(dl_nns); ++ns)
- for (struct link_map *l = GL(dl_ns)[ns]._ns_loaded; l != NULL;
- l = l->l_next)
- if (caller >= l->l_map_start && caller < l->l_map_end
- && (l->l_contiguous || _dl_addr_inside_object (l, caller)))
- {
- match = l;
- break;
- }
+ struct link_map *match = l ? l : GL(dl_ns)[LM_ID_BASE]._ns_loaded;
if (handle == RTLD_DEFAULT)
{
diff --git a/elf/dl-sysdep.c b/elf/dl-sysdep.c
index 42bc8145d7..d8f3dd2fb9 100644
--- a/elf/dl-sysdep.c
+++ b/elf/dl-sysdep.c
@@ -167,7 +167,7 @@ _dl_sysdep_start (void **start_argptr,
new_sysinfo = av->a_un.a_val;
break;
#endif
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
case AT_SYSINFO_EHDR:
GLRO(dl_sysinfo_dso) = (void *) av->a_un.a_val;
break;
diff --git a/elf/elf.h b/elf/elf.h
index 9bc5004c17..d096a97e7e 100644
--- a/elf/elf.h
+++ b/elf/elf.h
@@ -2343,23 +2343,25 @@ typedef Elf32_Addr Elf32_Conflict;
/* ARM relocs. */
#define R_ARM_NONE 0 /* No reloc */
-#define R_ARM_PC24 1 /* PC relative 26 bit branch */
+#define R_ARM_PC24 1 /* Deprecated PC relative 26
+ bit branch. */
#define R_ARM_ABS32 2 /* Direct 32 bit */
#define R_ARM_REL32 3 /* PC relative 32 bit */
#define R_ARM_PC13 4
#define R_ARM_ABS16 5 /* Direct 16 bit */
#define R_ARM_ABS12 6 /* Direct 12 bit */
-#define R_ARM_THM_ABS5 7
+#define R_ARM_THM_ABS5 7 /* Direct & 0x7C (LDR, STR). */
#define R_ARM_ABS8 8 /* Direct 8 bit */
#define R_ARM_SBREL32 9
-#define R_ARM_THM_PC22 10
-#define R_ARM_THM_PC8 11
+#define R_ARM_THM_PC22 10 /* PC relative 24 bit (Thumb32 BL). */
+#define R_ARM_THM_PC8 11 /* PC relative & 0x3FC
+ (Thumb16 LDR, ADD, ADR). */
#define R_ARM_AMP_VCALL9 12
#define R_ARM_SWI24 13 /* Obsolete static relocation. */
#define R_ARM_TLS_DESC 13 /* Dynamic relocation. */
-#define R_ARM_THM_SWI8 14
-#define R_ARM_XPC25 15
-#define R_ARM_THM_XPC22 16
+#define R_ARM_THM_SWI8 14 /* Reserved. */
+#define R_ARM_XPC25 15 /* Reserved. */
+#define R_ARM_THM_XPC22 16 /* Reserved. */
#define R_ARM_TLS_DTPMOD32 17 /* ID of module containing symbol */
#define R_ARM_TLS_DTPOFF32 18 /* Offset in TLS block */
#define R_ARM_TLS_TPOFF32 19 /* Offset in static TLS block */
@@ -2370,21 +2372,109 @@ typedef Elf32_Addr Elf32_Conflict;
#define R_ARM_GOTOFF 24 /* 32 bit offset to GOT */
#define R_ARM_GOTPC 25 /* 32 bit PC relative offset to GOT */
#define R_ARM_GOT32 26 /* 32 bit GOT entry */
-#define R_ARM_PLT32 27 /* 32 bit PLT address */
-#define R_ARM_ALU_PCREL_7_0 32
-#define R_ARM_ALU_PCREL_15_8 33
-#define R_ARM_ALU_PCREL_23_15 34
-#define R_ARM_LDR_SBREL_11_0 35
-#define R_ARM_ALU_SBREL_19_12 36
-#define R_ARM_ALU_SBREL_27_20 37
+#define R_ARM_PLT32 27 /* Deprecated, 32 bit PLT address. */
+#define R_ARM_CALL 28 /* PC relative 24 bit (BL, BLX). */
+#define R_ARM_JUMP24 29 /* PC relative 24 bit
+ (B, BL<cond>). */
+#define R_ARM_THM_JUMP24 30 /* PC relative 24 bit (Thumb32 B.W). */
+#define R_ARM_BASE_ABS 31 /* Adjust by program base. */
+#define R_ARM_ALU_PCREL_7_0 32 /* Obsolete. */
+#define R_ARM_ALU_PCREL_15_8 33 /* Obsolete. */
+#define R_ARM_ALU_PCREL_23_15 34 /* Obsolete. */
+#define R_ARM_LDR_SBREL_11_0 35 /* Deprecated, prog. base relative. */
+#define R_ARM_ALU_SBREL_19_12 36 /* Deprecated, prog. base relative. */
+#define R_ARM_ALU_SBREL_27_20 37 /* Deprecated, prog. base relative. */
+#define R_ARM_TARGET1 38
+#define R_ARM_SBREL31 39 /* Program base relative. */
+#define R_ARM_V4BX 40
+#define R_ARM_TARGET2 41
+#define R_ARM_PREL31 42 /* 32 bit PC relative. */
+#define R_ARM_MOVW_ABS_NC 43 /* Direct 16-bit (MOVW). */
+#define R_ARM_MOVT_ABS 44 /* Direct high 16-bit (MOVT). */
+#define R_ARM_MOVW_PREL_NC 45 /* PC relative 16-bit (MOVW). */
+#define R_ARM_MOVT_PREL 46 /* PC relative (MOVT). */
+#define R_ARM_THM_MOVW_ABS_NC 47 /* Direct 16 bit (Thumb32 MOVW). */
+#define R_ARM_THM_MOVT_ABS 48 /* Direct high 16 bit
+ (Thumb32 MOVT). */
+#define R_ARM_THM_MOVW_PREL_NC 49 /* PC relative 16 bit
+ (Thumb32 MOVW). */
+#define R_ARM_THM_MOVT_PREL 50 /* PC relative high 16 bit
+ (Thumb32 MOVT). */
+#define R_ARM_THM_JUMP19 51 /* PC relative 20 bit
+ (Thumb32 B<cond>.W). */
+#define R_ARM_THM_JUMP6 52 /* PC relative X & 0x7E
+ (Thumb16 CBZ, CBNZ). */
+#define R_ARM_THM_ALU_PREL_11_0 53 /* PC relative 12 bit
+ (Thumb32 ADR.W). */
+#define R_ARM_THM_PC12 54 /* PC relative 12 bit
+ (Thumb32 LDR{D,SB,H,SH}). */
+#define R_ARM_ABS32_NOI 55 /* Direct 32-bit. */
+#define R_ARM_REL32_NOI 56 /* PC relative 32-bit. */
+#define R_ARM_ALU_PC_G0_NC 57 /* PC relative (ADD, SUB). */
+#define R_ARM_ALU_PC_G0 58 /* PC relative (ADD, SUB). */
+#define R_ARM_ALU_PC_G1_NC 59 /* PC relative (ADD, SUB). */
+#define R_ARM_ALU_PC_G1 60 /* PC relative (ADD, SUB). */
+#define R_ARM_ALU_PC_G2 61 /* PC relative (ADD, SUB). */
+#define R_ARM_LDR_PC_G1 62 /* PC relative (LDR,STR,LDRB,STRB). */
+#define R_ARM_LDR_PC_G2 63 /* PC relative (LDR,STR,LDRB,STRB). */
+#define R_ARM_LDRS_PC_G0 64 /* PC relative (STR{D,H},
+ LDR{D,SB,H,SH}). */
+#define R_ARM_LDRS_PC_G1 65 /* PC relative (STR{D,H},
+ LDR{D,SB,H,SH}). */
+#define R_ARM_LDRS_PC_G2 66 /* PC relative (STR{D,H},
+ LDR{D,SB,H,SH}). */
+#define R_ARM_LDC_PC_G0 67 /* PC relative (LDC, STC). */
+#define R_ARM_LDC_PC_G1 68 /* PC relative (LDC, STC). */
+#define R_ARM_LDC_PC_G2 69 /* PC relative (LDC, STC). */
+#define R_ARM_ALU_SB_G0_NC 70 /* Program base relative (ADD,SUB). */
+#define R_ARM_ALU_SB_G0 71 /* Program base relative (ADD,SUB). */
+#define R_ARM_ALU_SB_G1_NC 72 /* Program base relative (ADD,SUB). */
+#define R_ARM_ALU_SB_G1 73 /* Program base relative (ADD,SUB). */
+#define R_ARM_ALU_SB_G2 74 /* Program base relative (ADD,SUB). */
+#define R_ARM_LDR_SB_G0 75 /* Program base relative (LDR,
+ STR, LDRB, STRB). */
+#define R_ARM_LDR_SB_G1 76 /* Program base relative
+ (LDR, STR, LDRB, STRB). */
+#define R_ARM_LDR_SB_G2 77 /* Program base relative
+ (LDR, STR, LDRB, STRB). */
+#define R_ARM_LDRS_SB_G0 78 /* Program base relative
+ (LDR, STR, LDRB, STRB). */
+#define R_ARM_LDRS_SB_G1 79 /* Program base relative
+ (LDR, STR, LDRB, STRB). */
+#define R_ARM_LDRS_SB_G2 80 /* Program base relative
+ (LDR, STR, LDRB, STRB). */
+#define R_ARM_LDC_SB_G0 81 /* Program base relative (LDC,STC). */
+#define R_ARM_LDC_SB_G1 82 /* Program base relative (LDC,STC). */
+#define R_ARM_LDC_SB_G2 83 /* Program base relative (LDC,STC). */
+#define R_ARM_MOVW_BREL_NC 84 /* Program base relative 16
+ bit (MOVW). */
+#define R_ARM_MOVT_BREL 85 /* Program base relative high
+ 16 bit (MOVT). */
+#define R_ARM_MOVW_BREL 86 /* Program base relative 16
+ bit (MOVW). */
+#define R_ARM_THM_MOVW_BREL_NC 87 /* Program base relative 16
+ bit (Thumb32 MOVW). */
+#define R_ARM_THM_MOVT_BREL 88 /* Program base relative high
+ 16 bit (Thumb32 MOVT). */
+#define R_ARM_THM_MOVW_BREL 89 /* Program base relative 16
+ bit (Thumb32 MOVW). */
#define R_ARM_TLS_GOTDESC 90
#define R_ARM_TLS_CALL 91
-#define R_ARM_TLS_DESCSEQ 92
+#define R_ARM_TLS_DESCSEQ 92 /* TLS relaxation. */
#define R_ARM_THM_TLS_CALL 93
+#define R_ARM_PLT32_ABS 94
+#define R_ARM_GOT_ABS 95 /* GOT entry. */
+#define R_ARM_GOT_PREL 96 /* PC relative GOT entry. */
+#define R_ARM_GOT_BREL12 97 /* GOT entry relative to GOT
+ origin (LDR). */
+#define R_ARM_GOTOFF12 98 /* 12 bit, GOT entry relative
+ to GOT origin (LDR, STR). */
+#define R_ARM_GOTRELAX 99
#define R_ARM_GNU_VTENTRY 100
#define R_ARM_GNU_VTINHERIT 101
-#define R_ARM_THM_PC11 102 /* thumb unconditional branch */
-#define R_ARM_THM_PC9 103 /* thumb conditional branch */
+#define R_ARM_THM_PC11 102 /* PC relative & 0xFFE (Thumb16 B). */
+#define R_ARM_THM_PC9 103 /* PC relative & 0x1FE
+ (Thumb16 B/B<cond>). */
#define R_ARM_TLS_GD32 104 /* PC-rel 32 bit for global dynamic
thread local data */
#define R_ARM_TLS_LDM32 105 /* PC-rel 32 bit for local dynamic
@@ -2395,7 +2485,18 @@ typedef Elf32_Addr Elf32_Conflict;
static TLS block offset */
#define R_ARM_TLS_LE32 108 /* 32 bit offset relative to static
TLS block */
-#define R_ARM_THM_TLS_DESCSEQ 129
+#define R_ARM_TLS_LDO12 109 /* 12 bit relative to TLS
+ block (LDR, STR). */
+#define R_ARM_TLS_LE12 110 /* 12 bit relative to static
+ TLS block (LDR, STR). */
+#define R_ARM_TLS_IE12GP 111 /* 12 bit GOT entry relative
+ to GOT origin (LDR). */
+#define R_ARM_ME_TOO 128 /* Obsolete. */
+#define R_ARM_THM_TLS_DESCSEQ 129
+#define R_ARM_THM_TLS_DESCSEQ16 129
+#define R_ARM_THM_TLS_DESCSEQ32 130
+#define R_ARM_THM_GOT_BREL12 131 /* GOT entry relative to GOT
+ origin, 12 bit (Thumb32 LDR). */
#define R_ARM_IRELATIVE 160
#define R_ARM_RXPC25 249
#define R_ARM_RSBREL32 250
diff --git a/elf/pldd.c b/elf/pldd.c
index b09252d39c..d9388a19c2 100644
--- a/elf/pldd.c
+++ b/elf/pldd.c
@@ -43,10 +43,7 @@ extern char *program_invocation_short_name;
#define PACKAGE _libc_intl_domainname
/* External functions. */
-extern void *xmalloc (size_t n)
- __attribute_malloc__ __attribute_alloc_size (1);
-extern void *xrealloc (void *o, size_t n)
- __attribute_malloc__ __attribute_alloc_size (2);
+#include <programs/xmalloc.h>
/* Name and version of program. */
static void print_version (FILE *stream, struct argp_state *state);
diff --git a/elf/rtld.c b/elf/rtld.c
index 4014ef1042..23238ad3fc 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -1768,7 +1768,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
GL(dl_rtld_map).l_next = (i + 1 < main_map->l_searchlist.r_nlist
? main_map->l_searchlist.r_list[i + 1]
: NULL);
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
if (GLRO(dl_sysinfo_map) != NULL
&& GL(dl_rtld_map).l_prev->l_next == GLRO(dl_sysinfo_map)
&& GL(dl_rtld_map).l_next != GLRO(dl_sysinfo_map))
@@ -1880,7 +1880,7 @@ ERROR: ld.so: object '%s' cannot be loaded as audit interface: %s; ignored.\n",
if (dyn->d_tag == DT_NEEDED)
{
l = l->l_next;
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
/* Skip the VDSO since it's not part of the list
of objects we brought in via DT_NEEDED entries. */
if (l == GLRO(dl_sysinfo_map))
diff --git a/elf/setup-vdso.h b/elf/setup-vdso.h
index 1878fae151..a98dfeca33 100644
--- a/elf/setup-vdso.h
+++ b/elf/setup-vdso.h
@@ -20,7 +20,7 @@ static inline void __attribute__ ((always_inline))
setup_vdso (struct link_map *main_map __attribute__ ((unused)),
struct link_map ***first_preload __attribute__ ((unused)))
{
-#if defined NEED_DL_SYSINFO || defined NEED_DL_SYSINFO_DSO
+#ifdef NEED_DL_SYSINFO_DSO
if (GLRO(dl_sysinfo_dso) == NULL)
return;
diff --git a/elf/tlsdeschtab.h b/elf/tlsdeschtab.h
index 8de9861110..155f4fdd9b 100644
--- a/elf/tlsdeschtab.h
+++ b/elf/tlsdeschtab.h
@@ -129,7 +129,7 @@ _dl_make_tlsdesc_dynamic (struct link_map *map, size_t ti_offset)
or a futex wake to wake up any waiting threads, but let's try to
avoid introducing such dependencies. */
-inline static int
+static int
_dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller)
{
if (caller != td->entry)
@@ -147,7 +147,7 @@ _dl_tlsdesc_resolve_early_return_p (struct tlsdesc volatile *td, void *caller)
return 0;
}
-inline static void
+static void
_dl_tlsdesc_wake_up_held_fixups (void)
{
__rtld_lock_unlock_recursive (GL(dl_load_lock));
diff --git a/elf/tst-stackguard1.c b/elf/tst-stackguard1.c
index 2b4fd9a780..fba60bdc90 100644
--- a/elf/tst-stackguard1.c
+++ b/elf/tst-stackguard1.c
@@ -23,6 +23,7 @@
#include <string.h>
#include <sys/wait.h>
#include <stackguard-macros.h>
+#include <tls.h>
#include <unistd.h>
static const char *command;