summaryrefslogtreecommitdiff
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
parent885d9c24d4c21da941603baf555fc72a3765bbe3 (diff)
parent8e5113112ae7d3402e2afb01c8cee18d3beb0f2e (diff)
Merge remote-tracking branch 'origin/upstream' into 1.0
-rw-r--r--Makerules2
-rw-r--r--ldso/ldso/dl-debug.c11
-rw-r--r--ldso/ldso/dl-startup.c6
-rw-r--r--libc/signal/sigaddset.c3
-rw-r--r--libc/signal/sigdelset.c3
-rw-r--r--libc/sysdeps/linux/common/bits/sigset.h21
-rw-r--r--libc/sysdeps/linux/sparc/clone.S2
7 files changed, 24 insertions, 24 deletions
diff --git a/Makerules b/Makerules
index 87e3c19ee..1596988d2 100644
--- a/Makerules
+++ b/Makerules
@@ -330,7 +330,7 @@ define create-lds
-Wl,-z,relro -Wl,--hash-style=gnu -Wl,-z,defs \
-Wl,--verbose 2>&1 | LC_ALL=C \
$(SED) -e '/^=========/,/^=========/!d;/^=========/d' \
- -e 's/\. = .* + SIZEOF_HEADERS;/& $(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
+ -e 's/^\([ ]*\)\. = .* + SIZEOF_HEADERS;/&\n\1$(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
endef
define link.so
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
diff --git a/libc/signal/sigaddset.c b/libc/signal/sigaddset.c
index 7e800a7f1..837f65329 100644
--- a/libc/signal/sigaddset.c
+++ b/libc/signal/sigaddset.c
@@ -30,6 +30,7 @@ sigaddset (sigset_t *set, int signo)
return -1;
}
- return __sigaddset (set, signo);
+ __sigaddset (set, signo);
+ return 0;
}
libc_hidden_def(sigaddset)
diff --git a/libc/signal/sigdelset.c b/libc/signal/sigdelset.c
index de3b12ff0..9f3ab6659 100644
--- a/libc/signal/sigdelset.c
+++ b/libc/signal/sigdelset.c
@@ -29,6 +29,7 @@ int sigdelset (sigset_t *set, int signo)
return -1;
}
- return __sigdelset (set, signo);
+ __sigdelset (set, signo);
+ return 0;
}
libc_hidden_def(sigdelset)
diff --git a/libc/sysdeps/linux/common/bits/sigset.h b/libc/sysdeps/linux/common/bits/sigset.h
index beb859820..f220e8171 100644
--- a/libc/sysdeps/linux/common/bits/sigset.h
+++ b/libc/sysdeps/linux/common/bits/sigset.h
@@ -154,9 +154,9 @@ typedef struct {
# if !defined __USE_EXTERN_INLINES || defined __PROVIDE_OUT_OF_LINE_SIGSETFN
extern int __sigismember (const __sigset_t *, int);
libc_hidden_proto(__sigismember)
-extern int __sigaddset (__sigset_t *, int);
+extern void __sigaddset (__sigset_t *, int);
libc_hidden_proto(__sigaddset)
-extern int __sigdelset (__sigset_t *, int);
+extern void __sigdelset (__sigset_t *, int);
libc_hidden_proto(__sigdelset)
# endif
@@ -169,18 +169,19 @@ libc_hidden_proto(__sigdelset)
* will have its own copy of out-of line function emitted. */
# define _EXTERN_INLINE /*extern*/ __always_inline
# endif
-# define __SIGSETFN(NAME, BODY, CONST) \
-_EXTERN_INLINE int \
+# define __SIGSETFN(RET_TYPE, NAME, BODY, CONST) \
+_EXTERN_INLINE RET_TYPE \
NAME (CONST __sigset_t *__set, int __sig) \
{ \
unsigned long __mask = __sigmask (__sig); \
unsigned __word = __sigword (__sig); \
- return BODY; \
+ BODY; \
}
-__SIGSETFN (__sigismember, (__set->__val[__word] & __mask) ? 1 : 0, const)
-__SIGSETFN (__sigaddset, ((__set->__val[__word] |= __mask), 0), )
-__SIGSETFN (__sigdelset, ((__set->__val[__word] &= ~__mask), 0), )
+__SIGSETFN (int, __sigismember, return (__set->__val[__word] & __mask) ? 1 : 0,
+ const)
+__SIGSETFN (void, __sigaddset, (__set->__val[__word] |= __mask), )
+__SIGSETFN (void, __sigdelset, (__set->__val[__word] &= ~__mask), )
# undef __SIGSETFN
# endif
@@ -207,7 +208,7 @@ const_sigaddset(__sigset_t *set, int sig)
set->__val[word] |= mask;
}
# define __sigaddset(set, sig) \
- (__builtin_constant_p(sig) ? (const_sigaddset(set, sig), 0) : __sigaddset(set, sig))
+ (__builtin_constant_p(sig) ? const_sigaddset(set, sig) : __sigaddset(set, sig))
static __always_inline void
const_sigdelset(__sigset_t *set, int sig)
{
@@ -216,7 +217,7 @@ const_sigdelset(__sigset_t *set, int sig)
set->__val[word] &= ~mask;
}
# define __sigdelset(set, sig) \
- (__builtin_constant_p(sig) ? (const_sigdelset(set, sig), 0) : __sigdelset(set, sig))
+ (__builtin_constant_p(sig) ? const_sigdelset(set, sig) : __sigdelset(set, sig))
# endif
#endif /* ! _SIGSET_H_fns. */
diff --git a/libc/sysdeps/linux/sparc/clone.S b/libc/sysdeps/linux/sparc/clone.S
index 8d9da5ae5..1d0e3e6e1 100644
--- a/libc/sysdeps/linux/sparc/clone.S
+++ b/libc/sysdeps/linux/sparc/clone.S
@@ -22,7 +22,9 @@
#include <asm/errno.h>
#include <asm/unistd.h>
+#ifdef RESET_PID
#include <tcb-offsets.h>
+#endif
#include <sysdep.h>
#define CLONE_VM 0x00000100