This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".
The branch, master has been updated
via f2267227fd6f88f3abc85bfa0db3b19178c46460 (commit)
via 2da4ae47ba20683e066bd46486da1de94a2ceefc (commit)
via ebd37cdff46ebed0f6275d0a138b7fd29db9e174 (commit)
via ee99dcff4afdc809a67da69ac396d94f77dd6064 (commit)
via fdf72b29bc0599df84b5ff0c6ba97c7315b29ec2 (commit)
via dbd6b5fe7f13fe807eef13c4d7192d01611a0528 (commit)
via 9fa188f85fb8531b4669865b11dfbca8ebaaff5d (commit)
via 57ddadc1d9d3d41944901f6054864550cdd3a422 (commit)
from 7ea5fc8e6f92dcc01bcd883cf4bcfbb8993d89fe (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f2267227fd6f88f3abc85bfa0db3b19178c46460
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Sat Feb 14 15:25:44 2015 +0530
signal.h: elide memset from sigemptyset
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit 2da4ae47ba20683e066bd46486da1de94a2ceefc
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Sat Feb 14 15:25:43 2015 +0530
ARC: sigaction: fold default sigrestorer into "C"
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit ebd37cdff46ebed0f6275d0a138b7fd29db9e174
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Sat Feb 14 15:25:42 2015 +0530
ARC: sigaction: inline syscall trap
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit ee99dcff4afdc809a67da69ac396d94f77dd6064
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Sat Feb 14 15:25:41 2015 +0530
ARC: siagction: opencode memcpy
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit fdf72b29bc0599df84b5ff0c6ba97c7315b29ec2
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Sat Feb 14 15:25:40 2015 +0530
ARC: remove stale TRUNCATE64_HAS_4_ARGS
Not relevant anymore since commit e8cc14e59ed3f66b84e,
"libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT"
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit dbd6b5fe7f13fe807eef13c4d7192d01611a0528
Author: Alexey Brodkin <abrodkin(a)synopsys.com>
Date: Sat Feb 14 15:25:39 2015 +0530
ARC defconfigs: enable some items
perf: UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
elfutils: UCLIBC_HAS_PROGRAM_INVOCATION_NAME
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit 9fa188f85fb8531b4669865b11dfbca8ebaaff5d
Author: Alexey Brodkin <abrodkin(a)synopsys.com>
Date: Sat Feb 14 15:25:38 2015 +0530
ARC: add configuration option for MMU page size
ARC CPU may have MMU page size of 4/8(default)/16k.
uClibc needs to have page size configured accodring to HW it will be run on.
Signed-off-by: Alexey Brodkin <abrodkin(a)synopsys.com>
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
commit 57ddadc1d9d3d41944901f6054864550cdd3a422
Author: Vineet Gupta <Vineet.Gupta1(a)synopsys.com>
Date: Sat Feb 14 15:25:37 2015 +0530
ARC: Conditionalise certain relocations as provided by TLS tools only
uClibc mainline supports NPTL which in turns depends on TLS support in
the tools (gcc/binutils), which is yet to be merged in dev branches.
However there is some non NPTL code in uClibc, added as part of NPTL
effort, which relies on certain relocations only provided by NPTL
binutils. As a result building the current upstream even for LT.old
breaks.
So conditionalize that code on tools, bu tin lack of specific versions,
we use NPTL enabling as a sign the tools are equipped to handle those
relos.
Signed-off-by: Vineet Gupta <vgupta(a)synopsys.com>
-----------------------------------------------------------------------
Summary of changes:
extra/Configs/Config.arc | 17 ++++++++++++
extra/Configs/defconfigs/arc/defconfig | 4 ++-
include/signal.h | 3 ---
ldso/ldso/arc/dl-startup.h | 7 +++++
ldso/ldso/arc/dl-sysdep.h | 10 +++++++
libc/sysdeps/linux/arc/Makefile.arch | 3 +--
libc/sysdeps/linux/arc/bits/uClibc_arch_features.h | 3 ---
libc/sysdeps/linux/arc/bits/uClibc_page.h | 17 +++++++++---
libc/sysdeps/linux/arc/sigaction.c | 28 +++++++++++---------
libc/sysdeps/linux/arc/sigrestorer.S | 21 ---------------
10 files changed, 67 insertions(+), 46 deletions(-)
delete mode 100644 libc/sysdeps/linux/arc/sigrestorer.S
diff --git a/extra/Configs/Config.arc b/extra/Configs/Config.arc
index 40ff114..dc32ba4 100644
--- a/extra/Configs/Config.arc
+++ b/extra/Configs/Config.arc
@@ -21,3 +21,20 @@ config CONFIG_ARC_CPU_700
ARCompact ISA based ARC CPU
endchoice
+
+choice
+ prompt "MMU Page Size"
+ default CONFIG_ARC_PAGE_SIZE_8K
+
+config CONFIG_ARC_PAGE_SIZE_8K
+ bool "8KB"
+ help
+ Choose between 4k, 8k (default) or 16k
+
+config CONFIG_ARC_PAGE_SIZE_16K
+ bool "16KB"
+
+config CONFIG_ARC_PAGE_SIZE_4K
+ bool "4KB"
+
+endchoice
diff --git a/extra/Configs/defconfigs/arc/defconfig
b/extra/Configs/defconfigs/arc/defconfig
index 840c59f..2dca4f9 100644
--- a/extra/Configs/defconfigs/arc/defconfig
+++ b/extra/Configs/defconfigs/arc/defconfig
@@ -6,12 +6,13 @@ KERNEL_HEADERS="%KERNEL_HEADERS%"
# LDSO_CACHE_SUPPORT is not set
LDSO_RUNPATH=y
# LDSO_SAFE_RUNPATH is not set
-UCLIBC_HAS_THREADS_NATIVE=y
+LINUXTHREADS_OLD=y
PTHREADS_DEBUG_SUPPORT=y
UCLIBC_HAS_OBSTACK=y
UCLIBC_SUSV2_LEGACY=y
UCLIBC_SUSV3_LEGACY=y
UCLIBC_SUSV4_LEGACY=y
+UCLIBC_HAS_PROGRAM_INVOCATION_NAME=y
UCLIBC_HAS_OBSOLETE_BSD_SIGNAL=y
UCLIBC_SV4_DEPRECATED=y
UCLIBC_HAS_RPC=y
@@ -19,6 +20,7 @@ UCLIBC_HAS_FULL_RPC=y
UCLIBC_HAS_RESOLVER_SUPPORT=y
UCLIBC_HAS_LIBRESOLV_STUB=y
UCLIBC_HAS_LOCALE=y
+UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
UCLIBC_HAS_NFTW=y
UCLIBC_HAS_FTW=y
RUNTIME_PREFIX="%RUNTIME_PREFIX%"
diff --git a/include/signal.h b/include/signal.h
index be24cf3..38baacc 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -493,10 +493,7 @@ extern int __libc_current_sigrtmax (void) __THROW;
#ifdef _LIBC
extern sigset_t _sigintr attribute_hidden;
-/* simplified version without parameter checking */
# include <string.h>
-# undef __sigemptyset
-# define __sigemptyset(ss) (memset(ss, '\0', sizeof(sigset_t)), 0)
#endif
#endif /* signal.h */
diff --git a/ldso/ldso/arc/dl-startup.h b/ldso/ldso/arc/dl-startup.h
index 8e26ae8..ef89b53 100644
--- a/ldso/ldso/arc/dl-startup.h
+++ b/ldso/ldso/arc/dl-startup.h
@@ -33,9 +33,16 @@ __asm__(
" ; If ldso ran as cmd with executable file nm as arg \n"
" ; skip the extra args calc by dl_start() \n"
" ld_s r1, [sp] ; orig argc from aux-vec Tbl \n"
+
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
" ld r12, [pcl, _dl_skip_args@pcl] \n"
" add r2, pcl, _dl_fini@pcl ; finalizer \n"
+#else
+ " add r12, pcl, _dl_skip_args-.+(.&2) \n"
+ " ld r12, [r12] \n"
+ " add r2, pcl, _dl_fini-.+(.&2) ; finalizer \n"
+#endif
" add2 sp, sp, r12 ; discard argv entries from stack\n"
" sub_s r1, r1, r12 ; adjusted argc, on stack \n"
diff --git a/ldso/ldso/arc/dl-sysdep.h b/ldso/ldso/arc/dl-sysdep.h
index d71e16b..08b3bad 100644
--- a/ldso/ldso/arc/dl-sysdep.h
+++ b/ldso/ldso/arc/dl-sysdep.h
@@ -127,6 +127,7 @@ static __always_inline Elf32_Addr elf_machine_dynamic(void)
/* Return the run-time load address of the shared object. */
static __always_inline Elf32_Addr elf_machine_load_address(void)
{
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
/* To find the loadaddr we subtract the runtime addr of a non-local symbol
* say _DYNAMIC from it's build-time addr.
* N.B., gotpc loads get optimized by the linker if it finds the symbol
@@ -144,6 +145,15 @@ static __always_inline Elf32_Addr elf_machine_load_address(void)
"sub %0, %0, %1 ;delta"
"\n"
: "=&r" (addr), "=r"(tmp)
);
+#else
+ Elf32_Addr addr, tmp;
+ __asm__ (
+ "ld %1, [pcl, _dl_start@gotpc] ;build addr of _dl_start \n"
+ "add %0, pcl, _dl_start-.+(.&2) ;runtime addr of _dl_start \n"
+ "sub %0, %0, %1 ;delta \n"
+ : "=&r" (addr), "=r"(tmp)
+ );
+#endif
return addr;
}
diff --git a/libc/sysdeps/linux/arc/Makefile.arch b/libc/sysdeps/linux/arc/Makefile.arch
index 656ea35..1a52fc9 100644
--- a/libc/sysdeps/linux/arc/Makefile.arch
+++ b/libc/sysdeps/linux/arc/Makefile.arch
@@ -7,5 +7,4 @@
CSRC-y := syscall.c sigaction.c __syscall_error.c cacheflush.c
-SSRC-y := sigrestorer.S __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S \
- vfork.S clone.S
+SSRC-y := __longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S vfork.S clone.S
diff --git a/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
b/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
index 9313ee8..8af6eca 100755
--- a/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
+++ b/libc/sysdeps/linux/arc/bits/uClibc_arch_features.h
@@ -17,9 +17,6 @@
/* can your target use syscall6() for mmap ? */
#undef __UCLIBC_MMAP_HAS_6_ARGS__
-/* does your target use syscall4() for truncate64 ? (32bit arches only) */
-#undef __UCLIBC_TRUNCATE64_HAS_4_ARGS__
-
/* does your target have a broken create_module() ? */
#undef __UCLIBC_BROKEN_CREATE_MODULE__
diff --git a/libc/sysdeps/linux/arc/bits/uClibc_page.h
b/libc/sysdeps/linux/arc/bits/uClibc_page.h
index 26cec54..b05c575 100755
--- a/libc/sysdeps/linux/arc/bits/uClibc_page.h
+++ b/libc/sysdeps/linux/arc/bits/uClibc_page.h
@@ -9,16 +9,25 @@
/*
* ARC700/linux supports 4k, 8k, 16k pages (build time).
- * We rely on the kernel exported header (aka uapi headers since 3.8)
- * for PAGE_SIZE and friends. This avoids hand-editing here when building
- * toolchain.
*
* Although uClibc determines page size dynamically, from kernel's auxv which
* ARC Linux does pass, still the generic code needs a fall back
* _dl_pagesize = auxvt[AT_PAGESZ].a_un.a_val ? : PAGE_SIZE
*
*/
-#include <asm/page.h>
+
+#include <features.h>
+
+#if defined(__CONFIG_ARC_PAGE_SIZE_16K__)
+#define PAGE_SHIFT 14
+#elif defined(__CONFIG_ARC_PAGE_SIZE_4K__)
+#define PAGE_SHIFT 12
+#else
+#define PAGE_SHIFT 13
+#endif
+
+#define PAGE_SIZE (1UL << PAGE_SHIFT)
+#define PAGE_MASK (~(PAGE_SIZE-1))
/* TBD: fix this with runtime value for a PAGE_SIZE agnostic uClibc */
#define MMAP2_PAGE_SHIFT PAGE_SHIFT
diff --git a/libc/sysdeps/linux/arc/sigaction.c b/libc/sysdeps/linux/arc/sigaction.c
index 73c496d..4a4c9e2 100644
--- a/libc/sysdeps/linux/arc/sigaction.c
+++ b/libc/sysdeps/linux/arc/sigaction.c
@@ -10,8 +10,13 @@
#include <sys/syscall.h>
#include <bits/kernel_sigaction.h>
-extern void __default_rt_sa_restorer(void);
-//libc_hidden_proto(__default_rt_sa_restorer);
+/*
+ * Default sigretrun stub if user doesn't specify SA_RESTORER
+ */
+static void __default_rt_sa_restorer(void)
+{
+ INTERNAL_SYSCALL_NCS(__NR_rt_sigreturn, , 0);
+}
#define SA_RESTORER 0x04000000
@@ -22,23 +27,22 @@ __libc_sigaction (int sig, const struct sigaction *act, struct
sigaction *oact)
{
struct sigaction kact;
- /* !act means caller only wants to know @oact
- * Hence only otherwise, do SA_RESTORER stuff
- *
- * For the normal/default cases (user not providing SA_RESTORER) use
- * a real sigreturn stub to avoid kernel synthesizing one on user stack
- * at runtime, which needs PTE permissions update (hence TLB entry
- * update) and costly cache line flushes for code modification
+ /*
+ * SA_RESTORER is only relevant for act != NULL case
+ * (!act means caller only wants to know @oact)
*/
if (act && !(act->sa_flags & SA_RESTORER)) {
- memcpy(&kact, act, sizeof(kact));
kact.sa_restorer = __default_rt_sa_restorer;
- kact.sa_flags |= SA_RESTORER;
+ kact.sa_flags = act->sa_flags | SA_RESTORER;
+
+ kact.sa_handler = act->sa_handler;
+ kact.sa_mask = act->sa_mask;
act = &kact;
}
- return __syscall_rt_sigaction(sig, act, oact, sizeof(act->sa_mask));
+ return INLINE_SYSCALL(rt_sigaction, 4,
+ sig, act, oact, sizeof(act->sa_mask));
}
#ifndef LIBC_SIGACTION
diff --git a/libc/sysdeps/linux/arc/sigrestorer.S b/libc/sysdeps/linux/arc/sigrestorer.S
deleted file mode 100644
index 24531d8..0000000
--- a/libc/sysdeps/linux/arc/sigrestorer.S
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * Copyright (C) 2013 Synopsys, Inc. (
www.synopsys.com)
- *
- * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
- */
-
-#include <sysdep.h>
-#include <sys/syscall.h>
-
-/*
- * Provide a real sigreturn stub to avoid kernel synthesizing one
- * on user stack at runtime, which needs PTE permissions update
- * (hence TLB entry update) and costly cache line flushes for
- * code modification
- */
-
-ENTRY(__default_rt_sa_restorer)
- mov r8, __NR_rt_sigreturn
- ARC_TRAP_INSN
-END(__default_rt_sa_restorer)
-libc_hidden_def(__default_rt_sa_restorer)
hooks/post-receive
--
uClibc-ng - small C library for embedded systems