summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2015-03-04 13:37:16 -0600
committerWaldemar Brodkorb <wbx@openadk.org>2015-03-04 13:37:16 -0600
commit474700954dda085369a77e76c1c13a2c93b0a7e1 (patch)
tree8c4f30736e3331d09d0525847b48d49b40f39889 /ldso
parent885d9c24d4c21da941603baf555fc72a3765bbe3 (diff)
parent8e5113112ae7d3402e2afb01c8cee18d3beb0f2e (diff)
Merge remote-tracking branch 'origin/upstream' into 1.0
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/dl-debug.c11
-rw-r--r--ldso/ldso/dl-startup.c6
2 files changed, 6 insertions, 11 deletions
diff --git a/ldso/ldso/dl-debug.c b/ldso/ldso/dl-debug.c
index 1758bc387..88a48933c 100644
--- a/ldso/ldso/dl-debug.c
+++ b/ldso/ldso/dl-debug.c
@@ -112,8 +112,6 @@ _dl_debug_lookup (const char *undef_name, struct elf_resolve *undef_map,
const ElfW(Sym) *ref, struct symbol_ref *value, int type_class)
{
#ifdef SHARED
- unsigned long symbol_addr;
-
if (_dl_trace_prelink)
{
int conflict = 0;
@@ -123,17 +121,14 @@ _dl_debug_lookup (const char *undef_name, struct elf_resolve *undef_map,
|| _dl_trace_prelink_map == _dl_loaded_modules)
&& undef_map != _dl_loaded_modules)
{
- symbol_addr = (unsigned long)
- _dl_find_hash(undef_name, &undef_map->symbol_scope,
- undef_map, type_class, &val);
+ _dl_find_hash(undef_name, &undef_map->symbol_scope,
+ undef_map, type_class, &val);
if (val.sym != value->sym || val.tpnt != value->tpnt)
conflict = 1;
}
- if (value->sym
- && (__builtin_expect (ELF_ST_TYPE(value->sym->st_info)
- == STT_TLS, 0)))
+ if (unlikely(value->sym && ELF_ST_TYPE(value->sym->st_info) == STT_TLS))
type_class = 4;
if (conflict
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index 4893409e9..18a39ce2c 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -95,8 +95,8 @@
#include "dl-startup.h"
#ifdef __LDSO_PRELINK_SUPPORT__
-/* These defined magically in the linker script. */
-extern char _begin[] attribute_hidden;
+/* This is defined by the linker script. */
+extern ElfW(Addr) _begin[] attribute_hidden;
#endif
/* Static declarations */
@@ -181,7 +181,7 @@ DL_START(unsigned long args)
*/
if (!auxvt[AT_BASE].a_un.a_val)
- auxvt[AT_BASE].a_un.a_val = (Elf32_Addr) &_begin;
+ auxvt[AT_BASE].a_un.a_val = (ElfW(Addr)) &_begin;
/* Note: if the dynamic linker itself is prelinked, the load_addr is 0 */
DL_INIT_LOADADDR_BOOT(load_addr, elf_machine_load_address());
#else