summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* sgtty.h is useless, remove it on STRICT_HEADERSPeter S. Mazinger2011-03-033-0/+9
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* paths.h: add _PATH_GSHADOWPeter S. Mazinger2011-03-031-0/+1
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* guard nl_catd structure and related constants with STRICT_HEADERSPeter S. Mazinger2011-03-031-0/+4
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* better guard of IPV6 related stuffPeter S. Mazinger2011-03-031-3/+6
| | | | | | | | Function prototypes are visible whenever IPV6 option is enabled. Structures and constants are visible either if IPV6 is enabled or STRICT_HEADERS is disabled. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* do not care about libc-internal.h, remove hp-timing.hPeter S. Mazinger2011-03-031-1/+1
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* strcpy: remove unneeded includes from the generic versionPeter S. Mazinger2011-03-031-3/+0
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* update some headersPeter S. Mazinger2011-03-033-33/+40
| | | | | | | | Sync some headers with glibc. realpath is an XSI extension in SuSv4, add back guard and update comment, since it seems to allow != NULL in second arg. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* update some headersPeter S. Mazinger2011-03-0310-44/+81
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* make it possible to compile with -std=gnu99/c99 and use extern inlinesPeter S. Mazinger2011-03-031-1/+1
| | | | | | When compiled with -std=gnu99/c99 __GNUC_GNU_INLINE__ is not defined Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* simplify guard of uClibc internalsPeter S. Mazinger2011-03-031-1/+1
| | | | | | Simplify guard of uClibc internals, since _LIBC sections are removed on install. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* remove libc-internal.h on installPeter S. Mazinger2011-03-031-1/+1
| | | | | | Remove libc-internal.h on install, I think internal is a typo. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* remove ucontext.h and guard sigstack structure with SUSV4_LEGACY and ↵Peter S. Mazinger2011-03-039-6/+15
| | | | | | | | | | STRICT_HEADERS Remove ucontext.h if SUSV4_LEGACY is not set and fix it's references. Guard sigstack structure with SUSV4_LEGACY and STRICT_HEADERS. Disable sigstack function prototype, it is not provided by uClibc. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* make parse_printf_format() depend on UCLIBC_HAS_GLIBC_CUSTOM_PRINTFPeter S. Mazinger2011-03-032-0/+5
| | | | | | we already remove the printf.h header if this option is disabled Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* remove error handling from some syscallsPeter S. Mazinger2011-03-039-51/+33
| | | | | | | 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>
* fix dependency on ADVANCED_REALTIMEPeter S. Mazinger2011-03-033-33/+75
| | | | | | | 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>
* fix stubsPeter S. Mazinger2011-03-031-5/+1
| | | | | | We use enosys_stub only in this file so make it static Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* initialize 2 variables to get rid of compiler warningPeter S. Mazinger2011-03-031-1/+1
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* Correct ssp codePeter S. Mazinger2011-03-033-27/+15
| | | | | | | | 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>
* add missing prototypesPeter S. Mazinger2011-03-037-4/+34
| | | | | | Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* use common sigthread.hPeter S. Mazinger2011-03-032-45/+7
| | | | | | | 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>
* add missing prototypesPeter S. Mazinger2011-03-035-0/+7
| | | | | | Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* style updatePeter S. Mazinger2011-03-031-12/+5
| | | | | | Style update avoiding compile warnings Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* syntax fixesPeter S. Mazinger2011-03-033-8/+8
| | | | | | Avoid compile warnings about the use of undefined constants Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* avoid warnings on _STACK_GROWS_* usagePeter S. Mazinger2011-03-037-21/+21
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* syntax fixPeter S. Mazinger2011-03-031-1/+1
| | | | Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* try to fix duplicated slashes in the generated lib*.so filesPeter S. Mazinger2011-03-033-19/+19
| | | | | | | | 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>
* initialize tls_tpnt to NULL on all archsPeter S. Mazinger2011-03-033-3/+3
| | | | | | Initialize tls_tpnt to NULL on all archs instead of 0. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* disable build warnings in utilsPeter S. Mazinger2011-03-032-1/+2
| | | | | | Disable some build warnings in utils. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* guard IPv6 stuffPeter S. Mazinger2011-03-035-2/+37
| | | | | | disable IPv6 related stuff if feature is disabled. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* add UCLIBC_STRICT_HEADERS config optionPeter S. Mazinger2011-03-031-0/+11
| | | | | | | 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>
* include features.hPeter S. Mazinger2011-03-031-0/+1
| | | | | | include features.h to make the next ifdef work. Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* ldso: use ADDR_ALIGN instead of hard-coded valueCarmelo Amoroso2011-03-031-1/+1
| | | | | | | | | 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>
* nptl:arm: add a wrapper for .cfi_sections pseudo-opsCarmelo Amoroso2011-02-253-2/+7
| | | | | | | | | | | | | | | | 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>
* linuxthreads.old: fix nommu initial thread stack detectionMike Frysinger2011-02-242-17/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* unify stub logicMike Frysinger2011-02-2431-275/+195
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* bfin: fix fp reference in _JMPBUF_UNWINDSMike Frysinger2011-02-221-1/+1
| | | | | | | | | | | | 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>
* tempname: fix int precision warningsMike Frysinger2011-02-221-1/+4
| | | | | | | | | | | 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>
* nptl: imit waitpid just for MIPS O32Bernhard Reutner-Fischer2011-02-221-1/+0
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: fix fdpic buildsMike Frysinger2011-02-211-2/+7
| | | | | | | | | | | | 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>
* bfin: add support for new cacheflush syscallSteve Kilbane2011-02-213-1/+40
| | | | | | | | | 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>
* bfin: fix sram/dma syscall definitionsSteve Kilbane2011-02-213-5/+5
| | | | | | | | 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>
* bfin: add missing GNU-stack markings to __longjmpMike Frysinger2011-02-211-0/+2
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* buildsys: fix inverted logic with thread implsBernhard Reutner-Fischer2011-02-161-3/+2
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: use kbuild styleBernhard Reutner-Fischer2011-02-141-96/+39
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* buildsys: remove wrong fileBernhard Reutner-Fischer2011-02-141-1/+1
| | | | | | Somehow Makefile.in ended in there, remove it. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* arm: use EABI per defaultBernhard Reutner-Fischer2011-02-141-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* regex: remove set but not used variableBernhard Reutner-Fischer2011-02-141-3/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso: remove now unused variableBernhard Reutner-Fischer2011-02-141-1/+0
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl: fix typo in buildsysBernhard Reutner-Fischer2011-02-141-1/+1
| | | | | | 0f85b228 used 'filter-pout' instead of 'filter-out'. Fix that. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* FORMAT_FDPIC_ELF: only for FRV and BFINBernhard Reutner-Fischer2011-02-141-1/+1
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>