summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
2015-06-23xtensa: add ret_ERRVAL definitionMax Filippov
ret_ERRVAL is used by mq_timedsend and mq_timedreceive, it needs to be defined to retw, otherwise error return from those functions segfaults. This fixes the following testsuite failures: .... tst-mqueue1 FAIL tst-mqueue1 got 1 expected 0 Didn't expect signal from child: got `Segmentation fault' .... tst-mqueue2 FAIL tst-mqueue2 got 1 expected 0 Didn't expect signal from child: got `Segmentation fault' .... tst-mqueue3 FAIL tst-mqueue3 got 1 expected 0 Didn't expect signal from child: got `Segmentation fault' .... tst-mqueue4 FAIL tst-mqueue4 got 1 expected 0 Didn't expect signal from child: got `Segmentation fault' .... tst-mqueue5 FAIL tst-mqueue5 got 1 expected 0 Didn't expect signal from child: got `Segmentation fault' .... tst-mqueue6 FAIL tst-mqueue6 got 1 expected 0 Didn't expect signal from child: got `Segmentation fault' Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-06-23xtensa: fix stack frame size for NPTLMax Filippov
Cancellable syscalls use call8 to call functions that enable/disable cancellation, thus they cannot use the default FRAMESIZE. Redefine FRAMESIZE for such syscalls. This fixes the following testsuite failure: .... tst-mqueue8 FAIL tst-mqueue8 got 1 expected 0 going to cancel mq_receive in-time in-time mq_receive cancellation succeeded going to cancel mq_receive early Didn't expect signal from child: got `Segmentation fault' Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
2015-06-10just use 4k pages for microblaze, the config are missing and never committed ↵Waldemar Brodkorb
into uClibc
2015-06-10use common ptrace.h for xtensa, fixes buildroot issues compiling enlightmentWaldemar Brodkorb
2015-06-10h8300: Makefile updateYoshinori Sato
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-06-10h8300: headers updateYoshinori Sato
- wire up new kernel Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-06-10h8300: Assembly functionsYoshinori Sato
- remove symbol prefix - new startup - new clone syscall support Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-06-10siginfo: add signal info for seccomp related SIGSYSDaniel Golle
uClibc doesn't define signal info for the SIGSYS signal which is issued in case of hitting a syscall prohibited by seccomp. This is sad as it makes debugging seccomp filter policies impossible on some architectures (at least ARM and PowerPC, maybe also others) which do not coincidentally set si_value.sival_int as the syscall number. To fix this, import the definitions and macros needed from glibc. Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-06-10_scanf.c: Implement 'm' modifier for 'c' and '[' conversions.Will Newton
The current code implements the 'm' modifier only for 's' conversions and would cause a segfault if it was used for 'c' or '[' conversions. This patch extends the code to cover these cases too. The original version could write scanned data outside the passed buffer because index i used in the '[' conversion handling block was clobbered. Signed-off-by: Will Newton <will.newton@imgtec.com> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-06-10strftime: comment on %0xY %+nY %-nYBernhard Reutner-Fischer
Would fix: date -u +%4Y%2m%2d%2H%2M%2S Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-25Revert "Do not define unimplemented functions"Waldemar Brodkorb
This reverts commit bd3eaf83ef1b4954b6c0e7ba8bbdd29b2cd4a833. They are now implemented.
2015-04-24merge uClibc changesWaldemar Brodkorb
2015-04-22arm: Add BX and BXC macrosBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-22arm: Fix POP_RET for armv4t && interworkingBernhard Reutner-Fischer
It seems the condition was reversed which lead to e.g. arm-920t being confused Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-22NPTL: Rename a variableBernhard Reutner-Fischer
There seems to be a bug in gold with static TLS at least on x86_64 (?) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-18fix static linking of pthread appsWaldemar Brodkorb
When compiling python you get duplicate symbol problem. Seen in the autobuilders of buildroot project.
2015-04-15merge uClibc masterWaldemar Brodkorb
2015-04-14arm: thumb1: Fix conflicting types for _v3Bernhard Reutner-Fischer
In file included from ./include/sys/syscall.h:33:0, from libc/sysdeps/linux/common/sync_file_range.c:10: libc/sysdeps/linux/common/sync_file_range.c: In function '__sync_file_range_nocancel': ./include/bits/syscalls.h:144:16: error: conflicting types for '_v3' register int _v3 __asm__ ("v3") = _v3tmp; ^ ./libc/sysdeps/linux/arm/sysdep.h:281:7: note: in expansion of macro 'LOAD_ARGS_7' LOAD_ARGS_##nr (args) \ ^ ./libc/sysdeps/linux/arm/sysdep.h:324:2: note: in expansion of macro 'INTERNAL_SYSCALL_RAW' INTERNAL_SYSCALL_RAW(SYS_ify(name), err, nr, args) ^ ./libc/sysdeps/linux/arm/sysdep.h:256:40: note: in expansion of macro 'INTERNAL_SYSCALL' ({ unsigned int _inline_sys_result = INTERNAL_SYSCALL (name, , nr, args); \ ^ libc/sysdeps/linux/common/sync_file_range.c:32:9: note: in expansion of macro 'INLINE_SYSCALL' return INLINE_SYSCALL(sync_file_range, 7, fd, 0, ^ In file included from ./libpthread/nptl/sysdeps/unix/sysv/linux/arm/sysdep-cancel.h:18:0, from ./include/cancel.h:58, from libc/sysdeps/linux/common/sync_file_range.c:15: ./libc/sysdeps/linux/arm/sysdep.h:280:21: note: previous definition of '_v3' was here register int *_v3 __asm__ ("v3") = _sys_buf; \ ... Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-13return NULL for realloc(p,0) like glibcWaldemar Brodkorb
See discussion here about the issue: https://sourceware.org/bugzilla/show_bug.cgi?id=12547 Fixes testsuite errors.
2015-04-13libc: Fix page-size in getifaddrs()Bernhard Reutner-Fischer
TODO: this could need a cleanup.. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-13buildsys: Do not build crt upon pregenBernhard Reutner-Fischer
No need to build crt when just generating headers Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-13buildsys: tweak ucontext_i.h prerequisitesBernhard Reutner-Fischer
ucontext_i.h too depends on uClibc_config.h. Update it to look like the other MANGLE generated files and tweak prereqs Fixes: make realclean ; make -j libc/misc/internals/__uClibc_main.i Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-04-12remove more of the link_warningsWaldemar Brodkorb
Only the stub warnings left for now.
2015-04-12remove link warningsWaldemar Brodkorb
As recently discussed on the pgsql mailinglist, this warnings are more or less useless and some configure scripts are failing when these warnings are enabled. http://www.postgresql.org/message-id/20150320132351.GS3636@alvh.no-ip.org
2015-03-31libc: Fix page-size in getifaddrs()Bernhard Reutner-Fischer
TODO: this could need a cleanup.. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-31buildsys: Do not build crt upon pregenBernhard Reutner-Fischer
No need to build crt when just generating headers Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-31buildsys: tweak ucontext_i.h prerequisitesBernhard Reutner-Fischer
ucontext_i.h too depends on uClibc_config.h. Update it to look like the other MANGLE generated files and tweak prereqs Fixes: make realclean ; make -j libc/misc/internals/__uClibc_main.i Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-29merge uClibc git masterWaldemar Brodkorb
2015-03-27ARC: don't hard-code ELF_NGREGAlexey Brodkin
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> [updated changelog] Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-27ARC/signal: shield sa_restorer from compiler toggle side-effectsVineet Gupta
when building uClibc with -O0 (DODEBUG build) the default sigrestorer had some extra glue code generated for stack manipulation which was messing up resume from signal path. So annotate the function with -Os so that gcc would only generate the bare min 2 instruction TRAP sequence Reported-and-Debugged-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-26SH: add 't' to syscall clobber listBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-25utmp: favour POSIX utmpx over SVID utmpBernhard Reutner-Fischer
Note: _PATH_UTMPX == _PATH_UTMP and the utmp struct is identical to the utmpx struct so this only changes the external API entrypoints and NOT the underlying data source. This saves about 500b (~1300b from previously ~1950) while at it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-25utmp: Remove unneeded aliasBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24mips: switch float_t to floatBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24utmp: indentBernhard Reutner-Fischer
indent only, no code changes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24utmp: Remove unneeded aliasesBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24utmp: add _unlocked suffix to internal helpersBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24buildsys: HAS_UTMP (XPG2, SVr4 compat) knobBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24libc: TIME64_COMPAT32 for sparc, mipsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-24Revert "utent.c, wtent.c: move functions from utxent.c"Bernhard Reutner-Fischer
This reverts commit 84135275cfeebc0b233c1c96eeada4d4178a0b18. This change is said to make systemd deadlock (cannot reproduce this) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Conflicts: include/utmp.h
2015-03-22libc: add getrandom(2)Bernhard Reutner-Fischer
Introduce a <sys/random.h> for it. /* FIXME: aren't there a couple of __restrict and const missing ? */ extern int getrandom(void *__buf, size_t count, unsigned int flags) __nonnull ((1)) __wur; Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-22libc: Fix vfprintf compilation without HAS_FLOATSBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-22nptl/arm: Move aeabi_read_tp to uclibc_nonshared.aKhem Raj
Otherwise it creates wrong references from shared libs Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-22atexit_old: Do not add it to shared libcKhem Raj
atexit should only be in either uclibc_nonshared.a shared libc case or libc.a in static build case Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-18malloc-standard: Add locking to malloc_trimBernhard Reutner-Fischer
Closes bugzilla #4586 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-18malloc: checked_request2size failure deadlocksZhiqiang Zhang
For some rarely cases(almost App bugs), calling malloc with a very largre size, checked_request2size check will fail,set ENOMEM, and return 0 to caller. But this will let __malloc_lock futex locked and owned by the caller. In multithread circumstance, other thread calling malloc/calloc will NOT succeed and get locked. Signed-off-by: Zhiqiang Zhang <zhangzhiqiang.zhang@huawei.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-18libm: Add missing C99 float/ld wrappersBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-17libc: update strverscmpBernhard Reutner-Fischer
Closes bugzilla #7936 Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-17include: silence __leaf warningBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-16resolv: fix unaligned tmp buffer corner-caseAlexey Brodkin
On execution of "inet/gethost_r-align" test I noticed failure due to unaligned access (instaed of 4-byte aligned 1-byte aligned address was attempted to be accessed). Further investigation confirmed this nice and helpful test failure. Following commit removed usage of ALIGN_BUFFER_OFFSET on entry to __read_etc_hosts_r(): http://git.uclibc.org/uClibc/commit/?id=f65e66078b9f4d2d7f0fc336dee36e78fc467c0f So indeed if target architecture doesn't allow unaligned access and provided tmp buffer is not word aligned (and we will deal with pointers which means word-sized data units), then CPU will fail during execution. In case of ARC we'll see "Unaligned access" exception like this: --->8--- # potentially unexpected fatal signal 7. Path: /root/uClibc/test/inet/gethost_r-align CPU: 0 PID: 5514 Comm: gethost_r-align Not tainted 3.13.11 #2 task: 8f42a580 ti: 8f40e000 task.ti: 8f40e000 [ECR ]: 0x00230400 => Misaligned r/w from 0x5fdab341 [EFA ]: 0x5fdab341 [BLINK ]: 0x20032a18 [ERET ]: 0x20032a3c @off 0x12a3c in [/lib/libuClibc-0.9.34-git.so] VMA: 0x20020000 to 0x20062000 [STAT32]: 0x00000086 : U E2 E1 BTA: 0x20046014 SP: 0x5fdab260 FP: 0x00000000 LPS: 0x20046064 LPE: 0x20046068 LPC: 0x00000000 r00: 0x5fdab341 r01: 0x00000005 r02: 0x00000015 r03: 0x00000000 r04: 0x5fdab358 r05: 0x00000000 r06: 0x0a0a0a00 r07: 0x00000000 r08: 0x0000003f r09: 0x20067050 r10: 0x00000000 r11: 0x00000014 r12: 0x00000001 r13: 0x00000000 r14: 0x20060660 r15: 0x20060661 r16: 0x00000006 r17: 0x5fdab371 r18: 0x00000018 r19: 0x5fdab2b4 r20: 0x00020000 r21: 0x00000000 r22: 0x00029068 r23: 0x5fdab371 r24: 0x00010000 r25: 0x00000000 --->8--- To fix this problem we'll re-introduce tmp buffer force alignment before config parser invocation. Signed-off-by: Alexey Brodkin <Alexey.Brodkin@synopsys.com> Cc: Vineet Gupta <vgupta@synopsys.com> Cc: Waldemar Brodkorb <wbx@openadk.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>