Age | Commit message (Collapse) | Author |
|
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
Call getpid() in INTERNAL_SYSCALL will break the argument regs,
because gcc couldn't save destoryed regs for system call asm.
Ref to glibc, we could just remove all the check code.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
Change clone.S so that in FDPIC case we take into account the fact
that we are given a function descriptor.
* libc/sysdeps/linux/arm/clone.S (__clone): Support __FDPIC__.
Signed-off-by: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
|
|
Implements __gnu_Unwind_Find_got(), which is called from libgcc while
unwinding.
* libc/sysdeps/linux/arm/Makefile.arch (CSRC): Add find._got.c.
* libc/sysdeps/linux/arm/find_got.c: New file.
Signed-off-by: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
|
|
* libc/sysdeps/linux/arm/crt1.S: Define _start for __FDPIC__.
Signed-off-by: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
|
|
Add FDPIC dynamic relocations support, similar to what other FDPIC
targets do.
Lazy binding is implemented in a folllow-up patch.
Disable the SEND* macros because they involve relocations to
access constant strings that are unsupported by the existing
arm version.
Define DL_START, START, ARCH_NEEDS_BOOTSTRAP_RELOCS,
DL_CHECK_LIB_TYPE similarly to what other FDPIC targets do.
Define raise() because _dl_find_hash references __aeabi_uidivmod,
which uses __aeabi_idiv0 which in turn references raise.
* include/elf.h (R_ARM_FUNCDESC): Define.
(R_ARM_FUNCDESC_VALUE): Define.
* ldso/include/dl-string.h (SEND_STDERR, SEND_ADDRESS_STDERR)
(SEND_NUMBER_STDERR): Define empty for __FDPIC__.
* ldso/ldso/arm/dl-inlines.h: New file.
* ldso/ldso/arm/dl-startup.h (PERFORM_BOOTSTRAP_RELOC): Fix type
of load_addr. Fix handling of R_ARM_RELATIVE, add support for
R_ARM_FUNCDESC_VALUE.
(DL_START, START): Define for __FDPIC__.
(raise): Define.
* ldso/ldso/arm/dl-sysdep.h (ARCH_NEEDS_BOOTSTRAP_RELOCS): Define.
(DL_CHECK_LIB_TYPE): Define.
(elf_machine_type_class): Take into account FDPIC related
relocations.
(elf_machine_load_address): Support __FDPIC__.
(elf_machine_relative): Likewise.
* ldso/ldso/arm/elfinterp.c (_dl_linux_resolver): Dummy support
for __FDPIC__, implemented in a later patch.
(_dl_do_reloc): Fix reloc_adr computation for __FDPIC__, fix
handling of local symbols. Fix handling of R_ARM_RELATIVE, add
support for R_ARM_FUNCDESC_VALUE, R_ARM_FUNCDESC.
* ldso/ldso/arm/resolve.S: Make _dl_linux_resolve hidden.
* ldso/ldso/fdpic/dl-inlines.h (htab_delete): Declare.
* libc/sysdeps/linux/arm/bits/elf-fdpic.h: New file, similar to bfin's.
* libc/sysdeps/linux/arm/crtreloc.c: Likewise.
* libc/sysdeps/linux/arm/find_exidx.c (__dl_addr_in_loadaddr) Define.
(find_exidx_callback): Support __FDPIC__.
Signed-off-by: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
|
|
Only a simple hello world is tested in qemu system emulation.
|
|
In ltp testcase sendfile08.c, it use offset=NULL to test the api.
PATCH V2:
fixup the stupid missing check in the end. Sorry for lose test.
See "man sendfile" and it really support offset is NULL.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
This reverts commit b00fd230ed0b49b9f23d829ad5d09859f34bb754.
|
|
Ref the implement from the glibc and high=0 seems so bad.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
In ltp testcase sendfile08.c, it use offset=NULL to test the api.
See "man sendfile" and it really support offset is NULL.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
Those definitions exist on all other architectures, but were not
present in or1k specific headers when or1k support was merged.
On the kernel side, their support is completely architecture
independent, so we just need those definitions to make those fcntl()
calls available on or1k.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
|
|
Otherwise it breaks mips64 n64.
Should be used for aarch64/tilegx only.
|
|
Sync clone()/vfork() with GNU C Library.
Allow CFI and fix strsignal() / tcsetattr().
|
|
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
This adds basic support for tile architecture.
Only static binaries, no ld.so or threading support.
Tested with qemu-tilegx only.
|
|
From glibc commit 9aa5c222b9e0409143410a02b6364a3b25dbf028
[BZ #22919]
|
|
|
|
Newer iproute2 package make use of some of defines.
Sync missing defines with GNU C library.
|
|
... so don't declare it. Otherwise, eudev finds it declared and tries
to link with it - and fails.
Signed-off-by: Alexey Neyman <stilor@att.net>
|
|
|
|
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
Sync with GNU C library and consolidate duplicate non
architecture specific defines.
MAP_UNINITIALIZED is only defined to 0x4000000 and used by
the Linux kernel when CONFIG_MMAP_ALLOW_UNINITIALIZED is enabled.
CONFIG_MMAP_ALLOW_UNINITIALIZED is only available for nommu.
See Documentation/nommu-mmap.txt.
|
|
Fixes a buildroot build error with ffmpeg
In file included from /home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/signal.h:329:0,
from fftools/ffmpeg.h:26,
from fftools/ffmpeg_opt.c:23:
/home/bernd/buildroot/output/host/aarch64-buildroot-linux-uclibc/sysroot/usr/include/sys/ucontext.h:52:16:
error: field 'uc_mcontext' has incomplete type
mcontext_t uc_mcontext;
^~~~~~~~~~~
using this defconfig:
BR2_aarch64=y
BR2_PACKAGE_FFMPEG=y
sys/ucontext.h for other archs already include bits/sigcontext.h,
on aarch64 this is needed as well.
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
|
The fallback code is not used as all supported kernels have the
syscall. Check if a absolute path is returned from syscall.
|
|
It seems there is no real dependency to NPTL for these clock_*
functions when UCLIBC_ADVANCED_REALTIME is enabled.
No regressions found.
Reported-by: Baruch Siach <baruch@tkos.co.il>
|
|
This is to fix an error after switching to use generic syscalls.
libc/sysdeps/linux/common/syscall.c: In function 'syscall':
libc/sysdeps/linux/common/syscall.c:27:2: warning: implicit
declaration of function 'internal_syscall_ncs6'
[-Wimplicit-function-declaration]
return INLINE_SYSCALL_NCS(sysnum, 6, arg1, arg2, arg3, arg4, arg5,
arg6);
^
Defining these functions as described by Vincent Ren-Wei Chen
<vincentc@andestech.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
|
|
Traditionally nds32 has had a generic syscall implementation supporting
varargs.
During an audit it was found that this implementation seems to duplicate
the new common implementation and is no longer needed.
Signed-off-by: Stafford Horne <shorne@gmail.com>
|
|
Now that the common syscall implementation supports vararg calling
conventions we can safely use it on OpenRISC.
This saves a bit of code in the openrisc implementation.
Signed-off-by: Stafford Horne <shorne@gmail.com>
|
|
The definition of syscall() in unistd.h is with varargs. Traditionally
the common implementation in uclibc has been with regular arguments.
This patch updates that by using varargs.
This has caused issues on architectures like or1k which have different
calling conventions for varargs and regular arg parameters.
The implementation here is based on an implementation from Joel Stanley
<joel@jms.id.au>. There is a difference that I do not initialize the
stack args with 0 as they are immediately overwritten by va_args.
Signed-off-by: Stafford Horne <shorne@gmail.com>
|
|
Use __NR_sync_file_range2 for csky sync_file_range function.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
Port over NPTL/TLS support from GNU C Library.
In the first step only the slower syscall is used for TLS
access. The uClibc-ng testsuite shows 79 errors, so their
is room for bugfixes and improvements.
|
|
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
Busybox internally calls syscall(2).
- in unistd.h defined something like
int syscall(nr, ....)
- in syscall.c (common) implemented as
int syscall(nr, arg1, arg3, arg3, arg4, arg5, arg6)
This will not work, busybox thinks syscall should have varargs calling
conventions. But it doesnt in the uclibc implementation so no args go through.
Most architectures this will work. But on openrisc varargs are all sent on the
stack. Regular args are passed in registers.
Commit message and idea from Stafford Horne <shorne@gmail.com>.
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
Add missing member in struct statfs.
It is used by xfsprogs (f.e. 4.13.1).
Reported-by: Joshua Kinard <kumba@gentoo.org>
|
|
Previously we saved everything, but we only need to save the registers
that are promised to be untouched by the setjmp call.
|
|
|
|
It is supported both in the sense of being contained in mips version
of statfs/statfs64 structs and also in the sense that it's filled by
the corresponding kernel syscalls.
It is UNsupported in that sense that it's value is the same as that
of f_bsize (at least on older kernel versions, the oldest version
tested is 2.6.13), s. [1] and [2] for details ([1] is the latest
kernel version as of now, [2] is the oldest kernel version git
history is available for).
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/fs/statfs.c?h=v4.14-rc7#n64
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/fs/open.c?h=v2.6.12-rc2#n41
Follow-up of 68de9946e914d8c30dcc6667a059ea59e5b74cac
Signed-off-by: Eugene Rudoy <gene.devel@gmail.com>
Signed-off-by: Ralf Friedl <Ralf.Friedl@online.de>
|
|
Fix iteration over signals, synced with GNU C library code and
pending patches. Issues found when running dhcpcd with hook
scripts. (exit status 127)
Reported-By: kapeka <kapeka@bering-uclibc.de>
|
|
Follow the steps to build c-sky uclibc linux system:
1. git clone https://github.com/c-sky/buildroot.git
2. cd buildroot
3. make qemu_csky_ck810_uclibc_defconfig
4. make
Follow the buildroot/board/qemu/csky/readme.txt to run.
This buildroot toolchain is pre-build, But you can rebuild
the c-sky uclibc-ng alone and install it to the buildroot
sysroot manually.
We'll try our best to improve the uclibc-ng continuously.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
|
|
Signed-off-by: Stafford Horne <shorne@gmail.com>
|
|
|
|
According to standards SVID and SYSV.
Modified lgamma calling in case when 'signgam' variable should not be used.
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
After discussion on the busybox mailinglist.
Reported-by: Ralf Friedl <Ralf.Friedl@online.de>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
As h8/300 architecture does not use deprecated syscalls
after reintroduction into Linux upstream, this part of
the code in vfork.S is always unused.
|
|
The current uclibc-ng use 4 arguments, and this will cause
ltp-testsuite's preadv/pwritev case failed.
The syscall of preadv/pwritev in current linux-kernel is 5 arguments:
linux/fs/read_write.c:
SYSCALL_DEFINE5(preadv, unsigned long, fd, const struct iovec __user *, vec,
unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h)
SYSCALL_DEFINE5(pwritev, unsigned long, fd, const struct iovec __user *, vec,
unsigned long, vlen, unsigned long, pos_l, unsigned long, pos_h)
So just update to 5-args-syscall, and off_t could be 32bit or 64bit.
Signed-off-by: Guo Ren <ren_guo@c-sky.com>
|
|
An issue has been found with current implementation of signal restorer
function in uClibc and how GDB handles it. When debugger information is not
present, everything worked fine, because GDB would use a built-in logic to
determine if function is a signal restorer. However when debugging information
is present, debugger would rely solely on it and wouldn't use ARC-specific
functions to detect signal handler frames. Because debug information for signal restorer is generated
completely by the compiler, it lacks a marker, that identifies this as a
signal frame that requires special handling. While it is possible to insert
that marker via inline assembly, that still doesn't solve the whole problem,
because some other expectations are not met by the debug information - there
is no "nop" in front of the function, needed to fool debugger into thinking
that this was a function call, and references to previous frame information
need to be described manually. The simplest way to fix the problem is just
to make sure that signal restorer function will not have any debug function
at all, which can be done by writing it in assembly.
Alternative, more complex, solution, where debug information for signal
frame is manually defined can be found in
glibc/sysdeps/unix/sysv/linux/x86_64/sigaction.c [1].
[1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/x86_64/sigaction.c;hb=HEAD
Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
|
|
Remove enum __ptrace_flags along with the only constant it contains,
PTRACE_SEIZE_DEVEL, from Linux's sys/ptrace.h files.
Following GNU C library commit:
60e2846e2633a990bdf474004a373bde54c0bc5f
|