summaryrefslogtreecommitdiff
path: root/libc
AgeCommit message (Collapse)Author
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>
2015-03-14Add fix from OpenWrt for MIPS64 N64 ABIWaldemar Brodkorb
https://dev.openwrt.org/browser/trunk/toolchain/uClibc/patches-0.9.33.2/616-mips_fix_stat_time.patch When booting in Qemu you get for example failures from mdev -s otherwise.
2015-03-13unistd.h: put getppid under XOPEN2K8Bernhard Reutner-Fischer
Add __LEAF to all __THROW, introduce non-leaf __THROWNL Adjust affected spots accordingly. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-03-08fix regression for ARM thumb modeWaldemar Brodkorb
Sync with GNU libc, see here why r7 is not usable for thumb mode: https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/unix/sysv/linux/arm/sysdep.h;h=37eac192b1e2e7f53f112b16450b9ce57054e27f;hb=HEAD Remove old OABI support. Fixes build breakage for ARM noMMU builds. Still no runtime testing.
2015-03-04Merge remote-tracking branch 'origin/upstream' into 1.0Waldemar Brodkorb
2015-03-03sparc/clone.S: guard tcb-offsets.h include with RESET_PIDGustavo Zacarias
Otherwise we have a broken scenario with non-threading builds. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-27libc: silence warningBernhard Reutner-Fischer
include/bits/sigset.h:219:62: warning: right-hand operand of comma expression has no effect [-Wunused-value] include/bits/sigset.h:210:63: warning: right-hand operand of comma expression has no effect [-Wunused-value] Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-26use weak to fix f.e. cdrkit static compile. fixes #3Waldemar Brodkorb
2015-02-20sync with uClibcWaldemar Brodkorb
2015-02-20sync_file_range: fix standard UCLIBC_SYSCALL_ALIGN_64BIT handlingVineet Gupta
Currently UCLIBC_SYSCALL_ALIGN_64BIT is not explicitly handled. Fix that and make sure the special handling is done for powerpc/xtensa which use UCLIBC_SYSCALL_ALIGN_64BIT but don't use hole punched syscall handler in kernel. Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20posix_fadvise: handle 2 variants for SYSCALL_ALIGN_64BITVineet Gupta
arm/powerpc/xtensa pass @advice as 2nd arg to syscall (vs. canonical 4th) Current code however does this for UCLIBC_SYSCALL_ALIGN_64BIT which powerpc/xtensa also happen to define. This is not true for ARCv2 ISA and possibly other arch of future with 64-bit even register requirement, which uses the standard syscall handler in kernel. Fix that by providing 2 variants of SYSCALL_ALIGN_64BIT Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Baruch Siach <baruch@tkos.co.il> Cc: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20ARCv2: optimised string routinesVineet Gupta
Signed-off-by: Claudiu Zissulescu <claziss@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-20ARCv2 ISA supportVineet Gupta
This is next gen Instruction Set Architecture from Synopsys and basis for the ARC HS family of processors. http://www.synopsys.com/dw/ipdir.php?ds=arc-hs38-processor&elq_mid=5732&elq_cid=458802 http://www.synopsys.com/IP/ProcessorIP/ARCProcessors/arc-hs/Pages/default.aspx Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-17libc: add setns()Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-17Add eventfd_read() and eventfd_write()Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: sigaction: inline syscall trapVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: sigaction: fold default sigrestorer into "C"Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: siagction: opencode memcpyVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: remove stale TRUNCATE64_HAS_4_ARGSVineet Gupta
Not relevant anymore since commit e8cc14e59ed3f66b84e, "libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT" Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: add configuration option for MMU page sizeAlexey Brodkin
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@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-02-16ARC: sigaction: fold default sigrestorer into "C"Vineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-16ARC: sigaction: inline syscall trapVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-16ARC: siagction: opencode memcpyVineet Gupta
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-16ARC: remove stale TRUNCATE64_HAS_4_ARGSVineet Gupta
Not relevant anymore since commit e8cc14e59ed3f66b84e, "libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BIT" Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-16ARC: add configuration option for MMU page sizeAlexey Brodkin
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@synopsys.com> Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2015-02-14Revert "resolve merge"Waldemar Brodkorb
This reverts commit 6b6ede3d15f04fe825cfa9f697507457e3640344.
2015-02-14resolve mergeWaldemar Brodkorb
2015-02-12unbreak support for ARM no MMU caseWaldemar Brodkorb
As suggested on the uCLibc mailing list: http://lists.uclibc.org/pipermail/uclibc/2014-November/048702.html http://lists.uclibc.org/pipermail/uclibc/2014-November/048703.html http://lists.uclibc.org/pipermail/uclibc/2014-November/048704.html
2015-01-26merge upstream changesWaldemar Brodkorb