]> Git Repo - uclibc-ng.git/log
uclibc-ng.git
5 years agoriscv: add the MAP_UNINITIALIZED definition
Christoph Hellwig [Mon, 24 Jun 2019 13:37:37 +0000 (06:37 -0700)]
riscv: add the MAP_UNINITIALIZED definition

This avoids a nommu build failure.

Signed-off-by: Christoph Hellwig <[email protected]>
5 years agofix opendir, fpathconf and ttyname_r to use fstat64(), not fstat()
Denys Vlasenko [Fri, 21 Jun 2019 10:09:36 +0000 (12:09 +0200)]
fix opendir, fpathconf and ttyname_r to use fstat64(), not fstat()

There is no opendir64(), thus even programs built for 64-bit off_t
use opendir(). Before this change, internally opendir() uses fstat(),
with the following breakage if some of struct stat fields are too narrow:

$ strace ls -l
execve("/busybox/ls", ["ls", "-l"], 0x7ffcdc43ede8 /* 16 vars */) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
getuid32()                              = 0
time([1551486393 /* 2019-03-02T00:26:33+0000 */]) = 1551486393 (2019-03-02T00:26:33+0000)
ioctl(0, TIOCGWINSZ, {ws_row=38, ws_col=120, ws_xpixel=0, ws_ypixel=0}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
brk(NULL)                               = 0x9768000
brk(0x9769000)                          = 0x9769000
lstat64(".", 0xffa6e374)                = 0
open(".", O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
fstat(3, 0xffa6e378)                    = -1 EOVERFLOW (Value too large for defined data type)

See https://bugs.busybox.net/show_bug.cgi?id=11651

Signed-off-by: Denys Vlasenko <[email protected]>
5 years agoFix compilation issue when libuargp is compiled without __UCLIBC_HAS_PROGRAM_INVOCATI...
Yann Sionneau [Sun, 16 Jun 2019 13:06:42 +0000 (15:06 +0200)]
Fix compilation issue when libuargp is compiled without __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__

This fixes the issue reported at https://github.com/wbx-github/uclibc-ng/issues/2

Signed-off-by: Yann Sionneau <[email protected]>
5 years agomips: fix memmove() call when __ARCH_HAS_BWD_MEMCPY__ is not defined
Petar Jovanovic [Mon, 6 May 2019 13:29:02 +0000 (13:29 +0000)]
mips: fix memmove() call when __ARCH_HAS_BWD_MEMCPY__ is not defined

When arch (such as MIPS) does not define __ARCH_HAS_BWD_MEMCPY__, memmove()
calls memcpy() which is wrong for overlapping regions.

Signed-off-by: Petar Jovanovic <[email protected]>
5 years agosparc: remove asm constraint
Romain Naour [Fri, 24 May 2019 10:42:04 +0000 (12:42 +0200)]
sparc: remove asm constraint

uClibc-ng don't build with gcc 9.1 [1] due to a new check that
"catch illegal asm constraint usage" [2].
gcc 9.1 print this error:
"invalid hard register usage between earlyclobber operand and input operand"
The asm constraint is present in uClibc since it support sparc (back in 2002)[3].
Note: There is no such constraint is Glibc counterpart code [4].
[1] https://gitlab.com/kubu93/toolchains-builder/-/jobs/205435757
[2] https://github.com/gcc-mirror/gcc/commit/b782636f28f5c378897c238081d28d7a4a6ca578
[3] https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git/commit/?id=3b6d086531102b6d09ce852feb1e370d5dca3ce9
[4]
+https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/sparc/sysdep.h;h=981b2a26b7a91093f821c97876
+e55bc4be2d9f8a;hb=HEAD

5 years agopreadv/pwritev: fix offset argument type
Max Filippov [Fri, 10 May 2019 14:23:53 +0000 (07:23 -0700)]
preadv/pwritev: fix offset argument type

preadv/pwritev don't provide separate version for 64-bit wide off_t,
and default to 32-bit wide off_t, which results in a mismatch between
declaration and definition for user programs built with
-D_FILE_OFFSET_BITS=64.
Make offset argument of both functions __off64_t.
This fixes test misc/tst-preadvwritev on xtensa.

Signed-off-by: Max Filippov <[email protected]>
5 years agoxtensa: don't use l32r opcode explicitly
Max Filippov [Fri, 10 May 2019 14:48:14 +0000 (07:48 -0700)]
xtensa: don't use l32r opcode explicitly

xtensa assembler is capable of representing register loads with either
movi + addmi, l32r or const16, depending on the core configuration.
Don't use '.literal' and 'l32r' directly in the code, use 'movi' and let
the assembler relax them.

Signed-off-by: Max Filippov <[email protected]>
5 years agodocs/defines.txt: clarify LFS-related macros
Max Filippov [Fri, 10 May 2019 19:51:25 +0000 (12:51 -0700)]
docs/defines.txt: clarify LFS-related macros

Add description for _LARGEFILE_SOURCE, _LARGEFILE64_SOURCE,
_FILE_OFFSET_BITS and __USE_LARGEFILE, __USE_LARGEFILE64 and
__USE_FILE_OFFSET64 macros.

Signed-off-by: Max Filippov <[email protected]>
5 years agoFix build with SUPPORT_LD_DEBUG_EARLY enabled
Konstantin Vasin [Fri, 5 Apr 2019 16:10:34 +0000 (19:10 +0300)]
Fix build with SUPPORT_LD_DEBUG_EARLY enabled

5 years agoFix _dl_deallocate_tls in !SHARED case
Yann Sionneau [Tue, 9 Apr 2019 11:04:21 +0000 (13:04 +0200)]
Fix _dl_deallocate_tls in !SHARED case

This patch seems needed in builds where
- SHARED is not defined (no shared lib support)
- and USE_TLS is set

Without this patch, static_dtv is free'ed.
See the following backtrace:
0  __do_check_chunk (p=0x52638 <fork_handler_pool+2296>) at libc/stdlib/malloc-standard/malloc.c:80
1  0x0000000000017fa0 in __do_check_inuse_chunk (p=0x52638 <fork_handler_pool+2296>) at libc/stdlib/malloc-standard/malloc.c:143
2  0x0000000000017354 in free (mem=0x52648 <static_dtv>) at libc/stdlib/malloc-standard/free.c:293
3  0x000000000002d5b0 in _dl_deallocate_tls (tcb=0x58690, dealloc_tcb=false) at libpthread/nptl/sysdeps/generic/dl-tls.c:588
4  0x0000000000021c0c in __deallocate_stack (pd=0x58000) at libpthread/nptl/allocatestack.c:717
5  0x0000000000024408 in __free_tcb (pd=0x58000) at libpthread/nptl/pthread_create.c:217
6  0x00000000000200ac in pthread_join (threadid=360448, thread_return=0x0 <k1c_start>) at libpthread/nptl/pthread_join.c:109
7  0x0000000000010354 in tf (a=0x58000) at tst-basic3.c:42
8  0x00000000000247c8 in start_thread (arg=0x4000200960) at libpthread/nptl/pthread_create.c:285
9  0x0000000000026560 in ?? ()

This backtrace is obtained while debugging tst-basic3 from the uclibc-ng nptl testsuite.
It aborts because of the assert in malloc:
https://elixir.bootlin.com/uclibc-ng/v1.0.31/source/libc/stdlib/malloc-standard/malloc.c#L80

Signed-off-by: Yann Sionneau <[email protected]>
5 years agoFix TLS allocation and loading in !SHARED case
Yann Sionneau [Thu, 11 Apr 2019 10:21:57 +0000 (12:21 +0200)]
Fix TLS allocation and loading in !SHARED case

For ARCH where shared lib are not supported:
- SHARED is not set (!SHARED is true)
- __ARCH_HAS_NO_LDSO__ is set

so code inside #if !defined __ARCH_HAS_NO_LDSO__ && !defined SHARED
is compiled-out.

But without a call do _dl_aux_init(), _dl_phdr stays NULL and
__libc_setup_tls won't be able to allocate memory for the in-executable TLS
and also won't be able to load the initimage from ELF TLS segment.

This results in segfault when doing things like "errno = 0" like
in tst-cancel15.c for instance in uClibc-ng testsuite.

Signed-off-by: Yann Sionneau <[email protected]>
6 years agoFix NULL pointer dereference in open_memstream()
Eugene Yudin [Fri, 22 Feb 2019 16:47:53 +0000 (19:47 +0300)]
Fix NULL pointer dereference in open_memstream()

--000000000000cb1b1305827e5ae0
Content-Type: text/plain; charset="UTF-8"

Hi,

Current version of uClibc-ng has issue in open_memstream() function.
If the cookie variable is NULL (due malloc() fail) then null pointer is
dereferenced after if block.

The attached patch fixes this issue.
--
Best regards,
Eugene

<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>Current version of uClibc-ng has issue in open_memstream() function.</div><div>If the cookie variable is NULL (due malloc() fail) then null pointer is dereferenced after if block.</div><div><br></div><div>The attached patch fixes this issue.<br clear="all"><div>-- <br></div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div><span><div>Best regards,<br></div>Eugene</span></div></div></div></div></div></div></div></div></div>

6 years agocsky: Add EM_CSKY for ldso
Guo Ren [Wed, 26 Dec 2018 09:54:55 +0000 (17:54 +0800)]
csky: Add EM_CSKY for ldso

Support EM_CSKY 252 elf format.

Changelog:
Increase EM_NUM to 253

Signed-off-by: Guo Ren <[email protected]>
Signed-off-by: Mao Han <[email protected]>
6 years agofix issues in ethers.c
Waldemar Brodkorb [Fri, 14 Dec 2018 09:53:22 +0000 (10:53 +0100)]
fix issues in ethers.c

Old version manages strings the regular way (i.e. counting on zero-ended
sequences). In fact strings captured from the /etc/ethers file are
'\n'-ended. So, for example, using strchr function could lead to buffer
overflow.

Reported-by: "Andrey V. Zhmurin" <[email protected]
6 years agoxtensa: add custom bits/poll.h
Max Filippov [Wed, 12 Dec 2018 15:07:40 +0000 (07:07 -0800)]
xtensa: add custom bits/poll.h

Definitions of POLLWRNORM, POLLWRBAND and POLLREMOVE in xtensa linux
kernel are non-standard. Provide bits/poll.h with correct values for
these constants.

This fixes the following strace build errors:

  In file included from xlat/pollflags.h:4:0,
                   from poll.c:34:
  ./static_assert.h:40:24: error: static assertion failed: "POLLWRBAND != 0x0100"
   # define static_assert _Static_assert
                          ^
  xlat/pollflags.h:75:1: note: in expansion of macro ‘static_assert’
   static_assert((POLLWRBAND) == (0x0100), "POLLWRBAND != 0x0100");
   ^~~~~~~~~~~~~
  ./static_assert.h:40:24: error: static assertion failed: "POLLREMOVE != 0x0800"
   # define static_assert _Static_assert
                          ^
  xlat/pollflags.h:117:1: note: in expansion of macro ‘static_assert’
   static_assert((POLLREMOVE) == (0x0800), "POLLREMOVE != 0x0800");
   ^~~~~~~~~~~~~

Signed-off-by: Max Filippov <[email protected]>
6 years agoseveral patches for uclibc ng
[email protected] [Thu, 13 Dec 2018 01:37:12 +0000 (09:37 +0800)]
several patches for uclibc ng

I've got several patches to fix ltp/openmp/uclibc-ng-test testcase fail on
c-sky.
- fix a ltp testcase.
- fix the problem that pthread creat will fail when libomp is linked before
  libc, the variable pagesize is not init.
- fix tst-cancel4 and tst-cancel16.  tst-cancelx4 and tst-cancelx16 still fail
  with this patch applied, cleanup handler is not called for open/creat/fcntl,
  seems some thing wrong with unwind, I haven't check the rootcause yet.

6 years agoMAINTAINERS: add Mao Han for CSKY
Guo Ren [Thu, 13 Dec 2018 04:44:39 +0000 (12:44 +0800)]
MAINTAINERS: add Mao Han for CSKY

Signed-off-by: Guo Ren <[email protected]>
Signed-off-by: Mao Han <[email protected]>
6 years agostatfs.h: sync generic header with glibc
Waldemar Brodkorb [Tue, 27 Nov 2018 14:41:37 +0000 (15:41 +0100)]
statfs.h: sync generic header with glibc

Fix issues with aarch64 and df with mismatching header between kernel
and libc.

6 years agoDefined INLINE_SYSCALL_NOERR_NCS in mips/bits/syscalls.h
Volodymyr Boyko [Fri, 23 Nov 2018 00:19:55 +0000 (02:19 +0200)]
Defined INLINE_SYSCALL_NOERR_NCS in mips/bits/syscalls.h

On Linux/MIPS (O32 ABI) for system call we have two result registers - v0 and a3.
v0 contains actual syscall result on success or error number on fail, a3 set to 0/1
for indicating syscall success/fail. (if a3 == 1, v0 contains errno).
Now as we can see from definition of handle_sys (arch/mips/kernel/scall32-o32.S),
handler treats returned by syscall function (let's call "original") values in
range [-EMAXERRNO; 0[ as -errno, a3 is set to 1 and final returned (to userspace)
value is (-original).

INLINE_SYSCALL_NOERR_NCS defined in mips/bits/syscalls.h will handle
this behaviour.

Signed-off-by: Volodymyr Boyko <[email protected]>
6 years agobump for release 1.0.31
Waldemar Brodkorb [Wed, 14 Nov 2018 03:05:39 +0000 (04:05 +0100)]
bump for release 1.0.31

6 years agoAdd support for Thumb-only processors.
Christophe Lyon [Mon, 29 Oct 2018 14:34:25 +0000 (14:34 +0000)]
Add support for Thumb-only processors.

* ldso/ldso/arm/aeabi_read_tp.S: Add Thumb version.
* ldso/ldso/arm/dl-startup.h: Do not force ARM encoding, adjust
for Thumb.
* ldso/ldso/arm/resolve.S: Force Thumb encoding on Thumb-only
processors.
* libc/sysdeps/linux/arm/crt1.S: Do not force ARM encoding, adjust
for Thumb.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agotime.h: Add CLOCK_TAI
Petr Vorel [Sun, 28 Oct 2018 09:56:04 +0000 (10:56 +0100)]
time.h: Add CLOCK_TAI

Added in kernel in kernel 3.10 in
1ff3c9677bff ("timekeeping: Add CLOCK_TAI clockid")

NOTE: CLOCK_SGI_CYCLE was not added, as it has been lately removed.

Signed-off-by: Petr Vorel <[email protected]>
6 years agomkostemp64: clear flags, as mkostemp does
Carlos Santos [Mon, 29 Oct 2018 04:17:38 +0000 (01:17 -0300)]
mkostemp64: clear flags, as mkostemp does

This should have been made in commit 9649721950 but was forgotten.

Signed-off-by: Carlos Santos <[email protected]>
6 years agoARC: Accommodate TLS fix in Binutils
Evgeniy Didin [Wed, 24 Oct 2018 14:10:10 +0000 (17:10 +0300)]
ARC: Accommodate TLS fix in Binutils

[1] fixes clash of TLS variables on ARC and since LD now calculates relocations
a bit different now we need to update dynamic loader as well otherwise relocs
will be calculated improperly.

Note this is an ABI change and should go in-line with corresponding ARC tools.
That said either arc-2018.09 (to be released in few weeks) or the next version of upstream
Binutils (2.32) are required for normal TLS work on ARC.

Testcase:
----------------------------------8<-------------------------------
#include <stdio.h>
int foo3(void);
int foo1(void);

#ifdef _SHARED
int foo1(){
static __thread int val3=1;
val3 += 2;
return val3;
}

#elif _SHARED2
int foo3(){
static __thread int val2=0;
val2 += 2;
return val2;
}
#else
int main(){
printf("foo1 = %d \n", foo1());
printf("foo3 = %d \n", foo3());
return 0;
}
#endif
--------------------------------->8---------------------------------------

The result shoud be:
----8<----
foo1 = 3
foo3 = 2
---->8----

Commands to build artefacts:
----------------------------------------8<-------------------------------
arc-linux-gcc -fPIE -ffunction-sections  -fdata-sections  -pthread  -Os \
 -fPIC -o testtls.o -D_SHARED -c tst.c
arc-linux-gcc -fPIE -ffunction-sections  -fdata-sections  -pthread  -Os \
 -fPIC -o testtls2.o -D_SHARED2 -c tst.c
arc-linux-gcc  -shared -o libtesttls.so  testtls.o testtls2.o -lm -Os
arc-linux-gcc tst.c  -o tst.out -L./ -ltesttls -Os -fPIE
--------------------------------->8---------------------------------------

Add path to libtesttls.so file to LD_LIBRARY_PATH before runnig
tst.out application.

[1] https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=714e9a954a2e4123dcb26bb8da850e1344de4f5f

Signed-off-by: Alexey Brodkin <[email protected]>
Signed-off-by: Evgeniy Didin <[email protected]>
CC: Cupertino Miranda <[email protected]>
CC: Vineet Gupta <[email protected]>
CC: Waldemar Brodkorb <[email protected]>
6 years agodo not expose recvmmsg/sendmmsg for unsupported kernels
Waldemar Brodkorb [Sat, 20 Oct 2018 14:25:49 +0000 (16:25 +0200)]
do not expose recvmmsg/sendmmsg for unsupported kernels

6 years agobugfix renameat2 wrong implement.
Guo Ren [Thu, 13 Sep 2018 05:34:12 +0000 (13:34 +0800)]
bugfix renameat2 wrong implement.

Signed-off-by: Guo Ren <[email protected]>
6 years agowordexp: Fix the usage of the internal _itoa function
Segev Finer [Sat, 18 Aug 2018 17:21:08 +0000 (20:21 +0300)]
wordexp: Fix the usage of the internal _itoa function

The original from glibc received the end of the buffer and worked
backwards. Ours needs the beginning of the buffer.

Signed-off-by: Segev Finer <[email protected]>
6 years agosched_setaffinity: use the same style with glibc's
Guo Ren [Tue, 7 Aug 2018 12:43:21 +0000 (20:43 +0800)]
sched_setaffinity: use the same style with glibc's

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 <[email protected]>
6 years agortld: Avoid crash on R_ARM_NONE relocation
Christophe Lyon [Wed, 4 Jul 2018 16:09:21 +0000 (18:09 +0200)]
rtld: Avoid crash on R_ARM_NONE relocation

R_ARM_NONE contains no data, so avoid dereferencing it.

* ldso/ldso/arm/elfinterp.c (_dl_do_reloc): Handle R_ARM_NONE
relocation
(_dl_do_reloc_lazy): Likewise.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoFix shm_open posix compliance error code
Christophe Lyon [Wed, 4 Jul 2018 16:09:20 +0000 (18:09 +0200)]
Fix shm_open posix compliance error code

Handle EISDIR in shm_open like glibc does, and set EINVAL.

* librt/shm.c (shm_open): Handle EISDIR error.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agombtowc: Fix non compliant behavior for end of string
Christophe Lyon [Wed, 4 Jul 2018 16:09:19 +0000 (18:09 +0200)]
mbtowc: Fix non compliant behavior for end of string

Match glibc behavior.

* libc/stdlib/stdlib.c (mbtowc): Fix end of string behavior.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoisnan: Add isnan weak alias to __isnan
Christophe Lyon [Wed, 4 Jul 2018 15:55:42 +0000 (17:55 +0200)]
isnan: Add isnan weak alias to __isnan

* libm/s_isnan.c: Add isnan weak alias.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoFix htab_delete loop counter
Christophe Lyon [Wed, 4 Jul 2018 15:55:41 +0000 (17:55 +0200)]
Fix htab_delete loop counter

dlclose can crash or stuck the system:

When calling dlclose() then system can crash or freeze, because
htab_delete() in ldso/ldso/fdpic/dl-inlines.h uses size_t for i which
is a typedef to unsigned int.  We exit the loop on negative value of i
which can never occur since i is an unsigned int. This leads to random
free of various pointers that kill the system.

* ldso/include/inline-hashtab.h (htab_delete): Change type of 'i' to int.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl threads: Fix bug in using a weak variable.
Christophe Lyon [Wed, 4 Jul 2018 15:55:40 +0000 (17:55 +0200)]
nptl threads: Fix bug in using a weak variable.

In case __nptl_nthreads is not defined in the final binary then avoid
dereferencing the address since it's null. Anyway this means there is
no other thread and so we must exit.

* libc/misc/internals/__uClibc_main.c (__uClibc_main): Handle case
where &__nptl_nthreads is null.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Replace sbrk with mmap
Christophe Lyon [Wed, 4 Jul 2018 15:55:39 +0000 (17:55 +0200)]
nptl: Replace sbrk with mmap

Replace sbrk with mmap since this commit disables sbrk area
for FDPIC MMU-less platform:
fs/binfmt_elf_fdpic.c: fix brk area overlap with stack on NOMMU
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/fs/binfmt_elf_fdpic.c?id=4ac313111018cb44ecc250445de5ccb93026a980

* libpthread/nptl/sysdeps/generic/libc-tls.c (__libc_setup_tls):
Handle __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Clear TLS area for static binaries.
Christophe Lyon [Wed, 4 Jul 2018 15:55:38 +0000 (17:55 +0200)]
nptl: Clear TLS area for static binaries.

busybox init checks it has pid 1, but getpid() returns another value
when building busybox statically. This is because the corresponding
area is not cleared when allocated (it is allocated with
MAP_UNINITIALIZED, whose behavior depends on the Linux kernel's
CONFIG_MMAP_ALLOW_UNINITIALIZED).

This patch fixes the problem by explicitly clearing the memory area.

* libpthread/nptl/sysdeps/generic/libc-tls.c (__libc_tls_setup):
Clear tlsblock.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Use vfork on MMU-less for system()
Christophe Lyon [Wed, 4 Jul 2018 15:55:37 +0000 (17:55 +0200)]
nptl: Use vfork on MMU-less for system()

* libc/stdlib/system.c (FORK): Map to vfork if __ARCH_USE_MMU__
is defined.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Add pthread_mutex_getprioceiling and pthread_mutex_setprioceiling support
Christophe Lyon [Wed, 4 Jul 2018 15:55:36 +0000 (17:55 +0200)]
nptl: Add pthread_mutex_getprioceiling and pthread_mutex_setprioceiling support

* libpthread/nptl/Makefile.in (libpthread-routines-): Remove
pthread_mutex_getprioceiling.c and pthread_mutex_setprioceiling.c.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Allow sem_open to work on MMU-less systems
Christophe Lyon [Wed, 4 Jul 2018 15:55:35 +0000 (17:55 +0200)]
nptl: Allow sem_open to work on MMU-less systems

Allow both tmpfs and ramfs for shm devices.

* libpthread/nptl/linux_fsinfo.h (SHMFS_SUPER_MAGIC_WITH_MMU): Define.
(SHMFS_SUPER_MAGIC_WITHOUT_MMU): Define.
* libpthread/nptl/sem_open.c (__where_is_shmfs): Add support for
SHMFS_SUPER_MAGIC_WITHOUT_MMU.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Use linker-defined symbol to find start of .tdata section.
Christophe Lyon [Wed, 4 Jul 2018 15:55:34 +0000 (17:55 +0200)]
nptl: Use linker-defined symbol to find start of .tdata section.

phdr->p_vaddr of TLS segment is not a valid value for FDPIC so we can
either translate phdr->p_vaddr using loadmap (not easy here) or use a
new linker script defined symbol, whih this patch does.

* libpthread/nptl/sysdeps/generic/libc-tls.c (__tdata_start): Declare.
(__libc_setup_tls): Support __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Do not use madvise
Christophe Lyon [Wed, 4 Jul 2018 15:55:33 +0000 (17:55 +0200)]
nptl: Do not use madvise

start_thread() uses it, but it is not supported on MMU-less systems.

* libpthread/nptl/pthread_create.c (start_thread): Call madvise
only if __ARCH_USE_MMU__ is defined.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: Disable fork and atfork on MMU-less systems.
Christophe Lyon [Wed, 4 Jul 2018 15:55:32 +0000 (17:55 +0200)]
nptl: Disable fork and atfork on MMU-less systems.

They do not work on MMU-less systems.

For atfork, implement a hidden function that always returns EPERM.

* libpthread/nptl/sysdeps/unix/sysv/linux/fork.c: Disable if
__ARCH_USE_MMU__ is not defined.
* libpthread/nptl/sysdeps/unix/sysv/linux/libc_pthread_init.c
(__libc_pthread_init): Handle __ARCH_USE_MMU__.
* libpthread/nptl/sysdeps/unix/sysv/linux/register-atfork.c: Likewise.
* libpthread/nptl/sysdeps/unix/sysv/linux/unregister-atfork.c: Likewise.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agonptl: disable mprotect usage in stack protection
Christophe Lyon [Wed, 4 Jul 2018 15:55:31 +0000 (17:55 +0200)]
nptl: disable mprotect usage in stack protection

Since mprotect does not work on MMU-less systems, disable it if
__ARCH_USE_MMU__ is not defined.

* libpthread/nptl/allocatestack.c (change_stack_perm): Call
mprotect only if __ARCH_USE_MMU__ is defined.
(allocate_stack): Likewise.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Initialize _dl_error_catch_tsd without FUNCDESC relocation
Christophe Lyon [Wed, 4 Jul 2018 15:55:30 +0000 (17:55 +0200)]
rtld: Initialize _dl_error_catch_tsd without FUNCDESC relocation

Make _dl_initial_error_catch_tsd hidden, such that we do not need a
FUNCDESC relocation when initializing _dl_error_catch_tsd.

* ldso/ldso/dl-tls.c (_dl_initial_error_catch_tsd): Declare hidden.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Use ELF_RTYPE_CLASS_DLSYM
Christophe Lyon [Wed, 4 Jul 2018 15:55:29 +0000 (17:55 +0200)]
rtld: Use ELF_RTYPE_CLASS_DLSYM

rtld must call _dl_find_hash() with ELF_RTYPE_CLASS_DLSYM since we
want a function descriptor.

* ldso/ldso/ldso.c (_dl_get_ready_to_run): Support __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoenable NPTL on TARGET_arm
Christophe Lyon [Wed, 4 Jul 2018 15:55:28 +0000 (17:55 +0200)]
enable NPTL on TARGET_arm

* extra/Configs/Config.in: enable UCLIBC_HAS_THREADS_NATIVE on
TARGET_arm.

Signed-off-by: Christophe Lyon <[email protected]>
6 years agoarm/clone.S: Fix threading support
Christophe Lyon [Wed, 4 Jul 2018 15:55:27 +0000 (17:55 +0200)]
arm/clone.S: Fix threading support

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é <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Compile with -fno-unwind-tables -fno-asynchronous-unwind-tables
Christophe Lyon [Wed, 4 Jul 2018 15:55:26 +0000 (17:55 +0200)]
rtld: Compile with -fno-unwind-tables -fno-asynchronous-unwind-tables

Otherwise we have link errors because of unresolved refs in libgcc.a:

ld: /lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/libgcc.a(pr-support.o): in function `_Unwind_GetDataRelBase':
/libgcc/config/arm/pr-support.c:378: undefined reference to `abort'
ld: /lib/gcc/arm-none-uclinuxfdpiceabi/9.0.0/libgcc.a(unwind-arm.o): in function `unwind_phase2_forced':
/libgcc/unwind-arm-common.inc:511: undefined reference to `memcpy'

* ldso/ldso/Makefile.in (CFLAGS-rtld): Always use
-fno-unwind-tables -fno-asynchronous-unwind-tables on arm

Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Add lazy binding support
Christophe Lyon [Thu, 28 Mar 2013 09:46:55 +0000 (10:46 +0100)]
rtld: Add lazy binding support

Add support for R_ARM_FUNCDESC_VALUE and implement _dl_linux_resolver
for FDPIC on ARM.

* ldso/ldso/arm/elfinterp.c (_dl_linux_resolver): Support __FDPIC__.
(_dl_do_lazy_reloc): Likewise.
* ldso/ldso/arm/resolve.S (_dl_linux_resolve): Likewise.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoTLS: fix relocation computation
Christophe Lyon [Wed, 4 Jul 2018 15:55:25 +0000 (17:55 +0200)]
TLS: fix relocation computation

* ldso/ldso/dl-elf.c (_dl_load_elf_shared_library): Fix
l_tls_initimage computation.
* ldso/ldso/ldso.c (_dl_get_ready_to_run): Likewise.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoAllow to generate PIE 'static' binary
Christophe Lyon [Wed, 4 Jul 2018 15:55:23 +0000 (17:55 +0200)]
Allow to generate PIE 'static' binary

* libc/misc/internals/__uClibc_main.c (funcdesc_value): New.
(fdpic_init_array_jump): New.
(__uClibc_fini): Support __FDPIC__.
(__uClibc_main): Likewise.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoAdd runtime support needed for C++ exceptions
Christophe Lyon [Wed, 4 Jul 2018 15:55:22 +0000 (17:55 +0200)]
Add runtime support needed for C++ exceptions

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é <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoAdd application startup code for FDPIC
Christophe Lyon [Mon, 21 Jan 2013 08:37:43 +0000 (09:37 +0100)]
Add application startup code for FDPIC

* libc/sysdeps/linux/arm/crt1.S: Define _start for __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoFix bug in _dl_pread when using pread64 syscall
Christophe Lyon [Wed, 4 Jul 2018 15:55:20 +0000 (17:55 +0200)]
Fix bug in _dl_pread when using pread64 syscall

In ARM_EABI mode, the pread64 syscall parameters are aligned on
64-bits. This syscall is used in rtld when processing FDPIC
relocations.

* ldso/include/dl-syscall.h (__syscall_pread): Fix definition.
(__dl_pread): Fix syscall invocation.
* ldso/ldso/fdpic/dl-sysdep.h (__DL_PREAD): Handle __NR_pread64.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Add startup code
Christophe Lyon [Wed, 4 Jul 2018 15:55:19 +0000 (17:55 +0200)]
rtld: Add startup code

Implement _start: compute parameters for __self_reloc, and give
control to the user program.

* ldso/ldso/arm/dl-startup.h: Implement _start for __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Avoid FUNCDESC relocation on _start
Christophe Lyon [Wed, 4 Jul 2018 15:55:18 +0000 (17:55 +0200)]
rtld: Avoid FUNCDESC relocation on _start

* ldso/ldso/ldso.c (_start): Fix definition for __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Add FDPIC code for arm
Christophe Lyon [Fri, 18 Jan 2013 14:08:04 +0000 (15:08 +0100)]
rtld: Add FDPIC code for arm

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é <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Add #if defined (__FDPIC__)
Christophe Lyon [Wed, 4 Jul 2018 15:55:16 +0000 (17:55 +0200)]
rtld: Add #if defined (__FDPIC__)

Like for other FDPIC targets, add defined(__FDPIC__) where needed.

* include/link.h: Include bits/elf-fdpic.h if __FDPIC__ is defined.
(link_map): Use elf32_fdpic_loadaddr if __FDPIC__ is defined.
(dl_phdr_info): Likewise.
* ldso/include/dl-elf.h (__dl_parse_dynamic_info): Support
__FDPIC__.
* ldso/include/dl-hash.h (elf_resolve): Add funcdesc_ht field if
__FDPIC__ is defined.
* ldso/ldso/dl-hash.c (_dl_find_hash): Support __FDPIC__.
* libc/misc/elf/dl-iterate-phdr.c (dl_iterate_phdr): Support __FDPIC__.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agortld: Do not protect RELRO segments when we don't use an MMU.
Christophe Lyon [Wed, 4 Jul 2018 15:55:15 +0000 (17:55 +0200)]
rtld: Do not protect RELRO segments when we don't use an MMU.

Without MMU, we cannot mark memory regions as read-only.

* ldso/ldso/dl-elf.c (_dl_protect_relro): Do nothing if
__ARCH_USE_MMU__ is defined.

Signed-off-by: Christophe Lyon <[email protected]>
6 years agoAllow to select FDPIC ELF for arm architecture
Christophe Lyon [Wed, 4 Jul 2018 15:55:14 +0000 (17:55 +0200)]
Allow to select FDPIC ELF for arm architecture

* extra/Configs/Config.in.arch: Add TARGET_arm to the target list
for UCLIBC_FORMAT_FDPIC_ELF.

Signed-off-by: Mickaël Guêné <[email protected]>
Signed-off-by: Christophe Lyon <[email protected]>
6 years agoelf.h: add some missing defines
Waldemar Brodkorb [Fri, 29 Jun 2018 17:35:32 +0000 (19:35 +0200)]
elf.h: add some missing defines

6 years agoldso/arc: fix LD_DEBUG segv when printing R_ARC_NONE
Vineet Gupta [Wed, 27 Jun 2018 01:26:24 +0000 (18:26 -0700)]
ldso/arc: fix LD_DEBUG segv when printing R_ARC_NONE

Signed-off-by: Vineet Gupta <[email protected]>
6 years agoFix prototypes for preadv pwritev.
Vlad Starodubtsev [Thu, 26 Oct 2017 14:22:33 +0000 (17:22 +0300)]
Fix prototypes for preadv pwritev.

6 years agorisc-v: initial 64 bit port, static only (no TLS/NPTL)
Waldemar Brodkorb [Wed, 30 May 2018 23:04:17 +0000 (01:04 +0200)]
risc-v: initial 64 bit port, static only (no TLS/NPTL)

Only a simple hello world is tested in qemu system emulation.

6 years agoremove unused assembler functions for arm
Florian La Roche [Tue, 5 Jun 2018 05:11:08 +0000 (07:11 +0200)]
remove unused assembler functions for arm

These assembler functions seem to be unused/referenced, so we can remove
them completely.

Signed-off-by: Florian La Roche <[email protected]>
6 years agolibiconv: add missing header files from previuos commit
Waldemar Brodkorb [Tue, 29 May 2018 21:13:28 +0000 (23:13 +0200)]
libiconv: add missing header files from previuos commit

Missed in 5fdd379d9dbf8be74f2f1a0d33e62958e817ae7d.

6 years agolibiconv: port over simplified iconv from musl
Waldemar Brodkorb [Sat, 26 May 2018 19:47:00 +0000 (21:47 +0200)]
libiconv: port over simplified iconv from musl

6 years agolibrt: clock_nanosleep could be even used without threads
Waldemar Brodkorb [Sat, 5 May 2018 14:39:13 +0000 (16:39 +0200)]
librt: clock_nanosleep could be even used without threads

6 years agolibrt: declare clock_nanosleep not only for NPTL
Waldemar Brodkorb [Tue, 1 May 2018 17:35:20 +0000 (19:35 +0200)]
librt: declare clock_nanosleep not only for NPTL

Reported-by: Baruch Siach <[email protected]>
Signed-off-by: Waldemar Brodkorb <[email protected]>
6 years agoRevert "ldconfig: add glibc compatibility fix"
Waldemar Brodkorb [Sun, 29 Apr 2018 17:34:11 +0000 (19:34 +0200)]
Revert "ldconfig: add glibc compatibility fix"

This reverts commit 2a3bb4daf5778c5875674cd26a3c75b3d460a042.

This is breaking ld.so.cache usage. Seen on Gentoo/amd64.

Reported-by: "Anthony G. Basile" <[email protected]>
6 years agobump for release 1.0.30
Waldemar Brodkorb [Sat, 28 Apr 2018 18:50:38 +0000 (19:50 +0100)]
bump for release 1.0.30

6 years agomention Tile architecture
Waldemar Brodkorb [Sat, 28 Apr 2018 18:49:43 +0000 (19:49 +0100)]
mention Tile architecture

6 years agolibdl: first execute all destructors, then munmap library
Waldemar Brodkorb [Fri, 27 Apr 2018 05:00:54 +0000 (06:00 +0100)]
libdl: first execute all destructors, then munmap library

Fix problem which might exist since 2011. We need to execute
the destructors for all dependant libraries, before munmap the
shared libraries, otherwise running destructor of a dependent library
might cause a segfault, trying to access an already unmapped memory.

This fixes for example segfaults while running php -m with ldap
module.

Reported-By: Dave Flogeras <[email protected]>
Tested-By: Dave Flogeras <[email protected]>
6 years agolibdl: calculate the length for second parameter of munmap.
Dave Flogeras [Fri, 27 Apr 2018 12:21:28 +0000 (09:21 -0300)]
libdl: calculate the length for second parameter of munmap.

Revert 35105679b9a900d58dadd0852e679c235f8176ba and add some debug
code.

6 years agolinuxthreads: implement pthread_condattr_{s,g}etclock()
Waldemar Brodkorb [Sun, 22 Apr 2018 17:59:13 +0000 (18:59 +0100)]
linuxthreads: implement pthread_condattr_{s,g}etclock()

More applications are using pthread_condattr_setclock()/
pthread_condattr_getclock() in their code. Port these two
functions from NPTL over to be more compatible.

6 years agolibdl: end must be bigger than start
Waldemar Brodkorb [Sun, 22 Apr 2018 10:55:36 +0000 (11:55 +0100)]
libdl: end must be bigger than start

6 years agolibdl: remove gcc warnings
Waldemar Brodkorb [Sun, 22 Apr 2018 08:10:13 +0000 (09:10 +0100)]
libdl: remove gcc warnings

6 years agolibiconv: remove function, which is not available w/o libiconv a4 macros
Waldemar Brodkorb [Sun, 22 Apr 2018 07:40:55 +0000 (08:40 +0100)]
libiconv: remove function, which is not available w/o libiconv a4 macros

6 years agolibdl: fix problem with unmapping
Waldemar Brodkorb [Tue, 17 Apr 2018 19:19:06 +0000 (20:19 +0100)]
libdl: fix problem with unmapping

The munmap was still called with broken length, as sometimes
start was empty. This finally solves segfaults when running
php -m with ldap module activated.

6 years agolibdl: better checking and logging for ctors/dtors
Waldemar Brodkorb [Sun, 15 Apr 2018 20:05:26 +0000 (21:05 +0100)]
libdl: better checking and logging for ctors/dtors

6 years agolibdl: remove dead code
Waldemar Brodkorb [Sun, 15 Apr 2018 12:46:13 +0000 (13:46 +0100)]
libdl: remove dead code

6 years agolibdl: remove LDSO_NO_CLEANUP
Waldemar Brodkorb [Sat, 14 Apr 2018 17:32:18 +0000 (18:32 +0100)]
libdl: remove LDSO_NO_CLEANUP

6 years agolibdl: cleanup old inline changelog
Waldemar Brodkorb [Sat, 14 Apr 2018 17:22:33 +0000 (18:22 +0100)]
libdl: cleanup old inline changelog

6 years agoRevert "libdl: fix dlclose() issue"
Waldemar Brodkorb [Mon, 9 Apr 2018 01:23:07 +0000 (02:23 +0100)]
Revert "libdl: fix dlclose() issue"

This reverts commit bf4c2d242f587700e3eb2ffd5721ddaf3cdbc7e5.

6 years agocommon/sendfile.c: bugfix can't support offset is NULL
Guo Ren [Mon, 16 Apr 2018 07:35:20 +0000 (15:35 +0800)]
common/sendfile.c: bugfix can't support offset is NULL

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 <[email protected]>
6 years agoRevert "common/sendfile.c: bugfix can't support offset is NULL"
Waldemar Brodkorb [Tue, 17 Apr 2018 17:13:53 +0000 (18:13 +0100)]
Revert "common/sendfile.c: bugfix can't support offset is NULL"

This reverts commit b00fd230ed0b49b9f23d829ad5d09859f34bb754.

6 years agolseek.c: bugfix ltp lseek01.c
Guo Ren [Fri, 13 Apr 2018 08:24:41 +0000 (16:24 +0800)]
lseek.c: bugfix ltp lseek01.c

Ref the implement from the glibc and high=0 seems so bad.

Signed-off-by: Guo Ren <[email protected]>
6 years agocommon/sendfile.c: bugfix can't support offset is NULL
Guo Ren [Fri, 13 Apr 2018 07:48:02 +0000 (15:48 +0800)]
common/sendfile.c: bugfix can't support offset is NULL

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 <[email protected]>
6 years agoor1k: add F_{DUPFD_CLOEXEC, SETPIPE_SZ, GETPIPE_SZ}
Thomas Petazzoni [Thu, 12 Apr 2018 21:24:59 +0000 (23:24 +0200)]
or1k: add F_{DUPFD_CLOEXEC, SETPIPE_SZ, GETPIPE_SZ}

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 <[email protected]>
6 years agouse __NR_newfstatat only for modern Linux architectures
Waldemar Brodkorb [Mon, 2 Apr 2018 13:41:25 +0000 (14:41 +0100)]
use __NR_newfstatat only for modern Linux architectures

Otherwise it breaks mips64 n64.
Should be used for aarch64/tilegx only.

6 years agohppa: fix runtime issues
Waldemar Brodkorb [Mon, 19 Mar 2018 18:23:33 +0000 (19:23 +0100)]
hppa: fix runtime issues

Sync clone()/vfork() with GNU C Library.
Allow CFI and fix strsignal() / tcsetattr().

6 years agocsky: support bsd-setjmp and bsd-_setjmp.
Guo Ren [Thu, 15 Mar 2018 02:40:27 +0000 (10:40 +0800)]
csky: support bsd-setjmp and bsd-_setjmp.

Signed-off-by: Guo Ren <[email protected]>
6 years agolibdl: fix dlclose() issue
Waldemar Brodkorb [Thu, 15 Mar 2018 19:35:05 +0000 (20:35 +0100)]
libdl: fix dlclose() issue

There is a patch included in https://bugs.busybox.net/show_bug.cgi?id=6158
from 2013, which was never applied.
This really fixes the php -m segfaults.

6 years agoRevert "Revert "libdl: fix size parameter when unmap library in dlclose""
Waldemar Brodkorb [Wed, 14 Mar 2018 04:30:55 +0000 (05:30 +0100)]
Revert "Revert "libdl: fix size parameter when unmap library in dlclose""

This reverts commit 952bb00f0b2eb576b0bf48c4f87018429a42e28d.

And adds this fix for 64 Bit systems.
http://lists.busybox.net/pipermail/uclibc/2014-December/048737.html

6 years agotile: add basic support for tilegx
Waldemar Brodkorb [Sun, 4 Feb 2018 15:34:18 +0000 (15:34 +0000)]
tile: add basic support for tilegx

This adds basic support for tile architecture.
Only static binaries, no ld.so or threading support.
Tested with qemu-tilegx only.

7 years agosparc32: Add nop before __startcontext to stop unwinding
Waldemar Brodkorb [Fri, 9 Mar 2018 18:14:40 +0000 (19:14 +0100)]
sparc32: Add nop before __startcontext to stop unwinding

From glibc commit 9aa5c222b9e0409143410a02b6364a3b25dbf028
[BZ #22919]

7 years agoutils: fix compile of msgfmt/msgmerge
Waldemar Brodkorb [Mon, 5 Mar 2018 19:29:56 +0000 (20:29 +0100)]
utils: fix compile of msgfmt/msgmerge

The host utils are missing the dependencies, the target
utils need libiconv enabled.

7 years agofenv: only allow for ppc e500
Waldemar Brodkorb [Sun, 4 Mar 2018 12:07:27 +0000 (13:07 +0100)]
fenv: only allow for ppc e500

7 years agobump for release 1.0.29
Waldemar Brodkorb [Sat, 3 Mar 2018 17:22:30 +0000 (18:22 +0100)]
bump for release 1.0.29

7 years agoadd missing include to quieten compiler
Waldemar Brodkorb [Thu, 1 Mar 2018 19:17:57 +0000 (19:17 +0000)]
add missing include to quieten compiler

This page took 0.0768990000000001 seconds and 4 git commands to generate.