summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-03-03remove error handling from some syscallsPeter S. Mazinger
Remove error handling from getegid/getgid/geteuid/getuid/getppid/getpid/getpgrp Use strong_alias if fallbacks are needed Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03fix dependency on ADVANCED_REALTIMEPeter S. Mazinger
Do not depend on ADVANCED REALTIME for mq_send/mq_receive Added stubs implementation based on libc's stubs.c Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03fix stubsPeter S. Mazinger
We use enosys_stub only in this file so make it static Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03initialize 2 variables to get rid of compiler warningPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03Correct ssp codePeter S. Mazinger
Avoid using strong_alias in ssp, some archs dislike it. Make stack_chk_guard static. Export __stack_smash_handler only if compatibility option is enabled. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03add missing prototypesPeter S. Mazinger
Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03use common sigthread.hPeter S. Mazinger
NPTL build did not use the correct bits/sigthread.h, use a common version avoiding this. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03add missing prototypesPeter S. Mazinger
Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03style updatePeter S. Mazinger
Style update avoiding compile warnings Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03syntax fixesPeter S. Mazinger
Avoid compile warnings about the use of undefined constants Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03avoid warnings on _STACK_GROWS_* usagePeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03syntax fixPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03try to fix duplicated slashes in the generated lib*.so filesPeter S. Mazinger
Try to fix duplicated slashes in the generated lib*.so files and make sure that on installation the *bin directories are really created (avoid the misbehaviour of creating usrbin dir). Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03initialize tls_tpnt to NULL on all archsPeter S. Mazinger
Initialize tls_tpnt to NULL on all archs instead of 0. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03disable build warnings in utilsPeter S. Mazinger
Disable some build warnings in utils. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03guard IPv6 stuffPeter S. Mazinger
disable IPv6 related stuff if feature is disabled. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03add UCLIBC_STRICT_HEADERS config optionPeter S. Mazinger
Add config option to disable the visibility of structures/constants that should not be visible unless a feature is enabled. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03include features.hPeter S. Mazinger
include features.h to make the next ifdef work. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
2011-03-03ldso: use ADDR_ALIGN instead of hard-coded valueCarmelo Amoroso
Use ADDR_ALIGN to align the minvma when loading shared libraries instead of the hard coded 0xffffU value. This fixes teh stand/alone support on ARM as reported in bug #3133. Signed-off-by: Sven Ola <sven-ola@gmx.de> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-02-25nptl:arm: add a wrapper for .cfi_sections pseudo-opsCarmelo Amoroso
ARM disables by default the support for ASM CFI directives. Anyway using an old version of binutils that does not support some new pseudo-op, the build fails as below: AS libpthread/nptl/sysdeps/unix/sysv/linux/close.oS libpthread/nptl/sysdeps/unix/sysv/linux/close.S: Assembler messages: libpthread/nptl/sysdeps/unix/sysv/linux/close.S:9: Error: unknown pseudo-op: `.cfi_sections' The problem is that the .cfi_sections pseudo should be wrapped by a macro that expands to nothing when the CFI is off. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> CC: Khem Ray <ray.khem@gmail.com>
2011-02-24linuxthreads.old: fix nommu initial thread stack detectionMike Frysinger
Because the nommu address space is flat, and the application stack can literally be located anywhere, we cannot rely on the assumptions that the mmu port gets away with. Namely, that the first thread's stack lives at the top of memory and nothing will be created above it. Currently, the code rounds the current stack up a page and sets that as the "top" of the stack, and then marks the "bottom" of the stack as "1". Then as new threads are created, this assumption is further refined by slowly backing off the "bottom" when a new stack is created within the range of the initial stack. Simple ascii example (tid0 is the initial thread): 1 thread: [bos tid0 stack tos] 2 threads: [ tid0 stack ] [tid1 stack] 3 threads: [ tid0 stack ] [tid1 stack] [tid2 stack] As you can kind of see, this algorithm operates on one basic assumption: the initial top of stack calculation is the absolute top of the stack. While this assumption was fairly safe in the original nommu days of yore where the only file format was FLAT (which defaults to a 4KiB stack -- exactly 1 page), and memory was fairly tight, we can see that this falls apart pretty quickly as soon as the initial stack is larger than a page. The issue that crops up now is simple to hit: start an application with an 8KiB stack, execute some functions that put pressure on the stack so that it exceeds 4KiB, then start up some threads. The initial tos will be rounded up by a page, but this is actually the middle of the stack. Now when the initial thread returns from its functions (thus unwinding the stack) and tries to call something which calls back into libpthread, the thread_self() func fails to detect itself as the initial thread as the current stack is now above the tos. The __pthread_find_self() func kicks in, walks all the thread arrays, fails to find a hit, and then walks into uninitialized memory for the thread descriptor. Use of this garbage memory has obvious results -- things fall down & go boom. To address this, I extend the current algorithm to automatically scale back both the bottom and the top stack limits of the initial thread. We use the current stack pointer at "thread boot time" only as a single known point. The initial thread stack bottom is set to the bottom of memory and the initial thread stack top is set to the top of memory. Then as we create new stack threads, we figure out whether the new stack is above or below the single known good address, and then scale back either the tos or the bos accordingly. Reviewed-by: Steven J. Magnani <steve@digidescorp.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-24unify stub logicMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22bfin: fix fp reference in _JMPBUF_UNWINDSMike Frysinger
We want to access the frame pointer, so do so directly rather than "overflowing" the pregs array and ending up at the fp member. This fixes the Blackfin build warnings: libpthread/linuxthreads.old/ptlongjmp.c: In function 'pthread_cleanup_upto': libpthread/linuxthreads.old/ptlongjmp.c:35: warning: array subscript is above array bounds libpthread/linuxthreads.old/ptlongjmp.c:56: warning: array subscript is above array bounds Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22tempname: fix int precision warningsMike Frysinger
The printf precision takes an integer, not a size_t. Otherwise we get: libc/misc/internals/tempname.c: In function '___path_search': libc/misc/internals/tempname.c:116: warning: field precision should have type 'int', but argument 3 has type 'size_t' field precision should have type 'int', but argument 5 has type 'size_t' Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-22nptl: imit waitpid just for MIPS O32Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-21ldso: fix fdpic buildsMike Frysinger
Commit 33cb7f0b4 tried to add a small optimization for skipping unnecessary .dynamic adjustments, but did so by referencing an opaque type. While this works for non-fdpic targets (since the type can be cast to an integer), it falls apart for fdpic targets where the type is actually a structure. Since FDPIC can't support this optimization without walking a series of linked structures, just skip it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-21bfin: add support for new cacheflush syscallSteve Kilbane
Newer gcc's will generate a call to cacheflush when updating jump tables, and that has to be done in kernel space (to avoid hardware anomalies). So make sure uClibc provides that symbol. Signed-off-by: Steve Kilbane <steve@whitecrow.demon.co.uk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-21bfin: fix sram/dma syscall definitionsSteve Kilbane
Once we pull in the header, we're forced to declare the syscall with all the right types. Signed-off-by: Steve Kilbane <steve@whitecrow.demon.co.uk> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-21bfin: add missing GNU-stack markings to __longjmpMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-16buildsys: fix inverted logic with thread implsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14buildsys: use kbuild styleBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14buildsys: remove wrong fileBernhard Reutner-Fischer
Somehow Makefile.in ended in there, remove it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14arm: use EABI per defaultBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14regex: remove set but not used variableBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14ldso: remove now unused variableBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14nptl: fix typo in buildsysBernhard Reutner-Fischer
0f85b228 used 'filter-pout' instead of 'filter-out'. Fix that. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-14FORMAT_FDPIC_ELF: only for FRV and BFINBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-11Fix memory leak in dlopen()/dlclose().Philip Craig
The linked list of library dependencies created by dlopen() was not being freed by dlclose(). Signed-off-by: Philip Craig <philipjcraig@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-11Fix GNU make v3.80 compatibilityKevin Cernekee
Commits 1f6601a and 094d82d introduced the "else ifeq" construct, which requires GNU make v3.81 or higher. This breaks the build on RHEL4 hosts. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-11arm: use CAS gcc builtin if SI-mode pattern is availableBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09TODO: updateBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09i386: extend IMA guards to also cover LTOBernhard Reutner-Fischer
See GCC PR47577; TODO: Remove them. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09*printf: Violation of precision with null stringJones Desougi
When a string format is processed and the argument is NULL, this yields "(null)" regardless of precision. This does not make sense, precision should not be exceeded. A simple test shows that glibc outputs nothing if precision is smaller than six and the attached patch implements this same behaviour. Consider the not uncommon case of strings implemented like this: struct string { int len; char *ptr; }; There is often no nultermination and they may be printed like this: printf("%.*s", string.len, string.ptr); If len is 0 then ptr may be anything, but NULL is a common value. Obviously the empty string would be expected, not "(null)". Signed-off-by: Jones Desougi <jones.desougi@27m.se> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09sync bits/socket.h PF_* / AF_* values with 2.6.38-rc3Peter Korsgaard
A number of new address / protocol families have been added over the years, so sync with Linux 2.6.38-rc3, adding CAN, ISDN, Phonet, Zigbee, .. which are starting to be used by applications. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-09arm: mv nptl specific atomic impl to common placeBernhard Reutner-Fischer
Thanks to Nitin Garg for notincing! Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-02-06fix a problem with hidden getutent in non-threaded buildsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02arm: fix the static link problem for ARM due to undefined __tls_get_addrNitin Garg
Signed-off-by: Nitin Garg <nitingarg98@gmail.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-02-01nios2: Name architecture correctly in endian.h headerTobias Klauser
Nios II is not i386 :-) Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-01-29nptl/mips64: Fix build when using mips64 and ABIs other than o32Khem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-01-29mips: avoid segmentation fault when RLD_MAP is 0Richard Braun
Signed-off-by: Richard Braun <rbraun@sceen.net> Acked-by: Joakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: Khem Raj <raj.khem@gmail.com>