summaryrefslogtreecommitdiffstats
path: root/libc/misc/internals
Commit message (Collapse)AuthorAgeFilesLines
* Compatible stack protector for non Thread Local storageNatanael Copa2011-12-231-7/+1
| | | | | | | Before we had thread local storage the __stack_chk_guard was a global variable that was referenced to by the older binaries. We since then have changed ABI so this patch can probably go away.
* Correct ssp codePeter S. Mazinger2011-03-031-18/+7
| | | | | | | | 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-031-2/+5
| | | | | | Add some missing prototypes Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
* 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>
* parse_config: discard rest of incomplete lineNatanael Copa2010-10-141-0/+7
| | | | | | | | If line is longer then size of given buffer and buffer is not allocated by the config parser itself, then discard rest of line. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* config parser: always initialize line pointerNatanael Copa2010-10-141-2/+1
| | | | | | | | We must always initialize line pointer since data pointer might have changed due to a realloc (in getserv.c for example). Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* config parser: do not assume that realloc return same pointerNatanael Copa2010-10-141-5/+4
| | | | | | | | | | | | We need to update the parser->line pointer on realloc and do not initialize the token array til after the potensial realloc in bb_get_chunk_with_continuation(). While here, also replace a realloc() with malloc() where pointer always is NULL. Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* misc: Fix build error about missing PAGE_SIZEAbdoulaye Walsimou Gaye2010-09-061-0/+1
| | | | | | | | | | | | | | | | This patch fixes the following build error: CC libc/misc/internals/__h_errno_location.os CC libc/misc/internals/parse_config.os libc/misc/internals/parse_config.c: In function 'bb_get_chunk_with_continuation': libc/misc/internals/parse_config.c:77: error: 'PAGE_SIZE' undeclared (first use in this function) libc/misc/internals/parse_config.c:77: error: (Each undeclared identifier is reported only once libc/misc/internals/parse_config.c:77: error: for each function it appears in.) make[2]: *** [libc/misc/internals/parse_config.os] Error 1 Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* getserv: fix reading services lines w > 80 charsBernhard Reutner-Fischer2010-08-191-4/+7
| | | | | | e.g. getservbyname() Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* config parser: fix memory corruptionTimo Teräs2010-08-061-2/+2
| | | | | | | | | | | | fgets will happily write over allocated area limits. Adjusted the buffer size according to how much is already read. Also increase the maximum default line length, as 80 is slightly small. It might be better if bb_get_chunk_with_continuation would reallocate the line buffer if it was not user given. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* add config parserBernhard Reutner-Fischer2010-08-052-3/+273
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* Revert "don't make __errno_location / __h_errno_location hidden"Austin Foxley2010-07-062-0/+4
| | | | | | | | This reverts commit 0d6ee549bc86fd330672a79d9a87d2c3825eea67. We need to find a solution that will work in shared and static libraries Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* don't make __errno_location / __h_errno_location hiddenPeter Korsgaard2010-07-052-4/+0
| | | | | | | | | | | | | Closes #2089 (https://bugs.busybox.net/show_bug.cgi?id=2089) __errno_location / __h_errno_location access has to go through the PLT like malloc/free, so the linuxthread variants gets used instead when compiling with -pthread. Based on http://github.com/mat-c/uClibc/commit/328d392c54aa5dc2b8e7f398a419087de497de2b Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* more workarounds for GCC PR32219Timo Teräs2010-06-301-2/+2
| | | | | | | | | | Commit 2e53dd645d5348f207cec7f8595969dc566c5a55 workarounds GCC bug when accessing _locale_init and _stdio_init. We need the same fix for __errno_location and __h_errno_location otherwise we crash calling null with static and non-threaded builds. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* nptl/errno: Use a separate __errno_location for libpthread.Khem Raj2010-06-301-1/+5
| | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* libc: Fix non-NPTL threads buildCarmelo Amoroso2010-06-171-1/+3
| | | | | | | | This patch fixes some issues building uclibc with linuxthreads, that seem to have been introduced by the NPTL changes. Signed-off-by: Andrew Stubbs <ams@codesourcery.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* static build: define pthreads wrappers only for threaded buildsTimo Teräs2010-05-171-0/+2
| | | | | | | | Otherwise we get compiler errors due to undefined prototypes as noticed by Denys. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* some (all?) archs don't define asm, so use builtin __asm__Austin Foxley2010-05-171-1/+1
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* workaround GCC PR32219Denys Vlasenko2010-05-171-2/+13
| | | | | | | | we ended up calling 0 Fixes bug #1033 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* static build: fix internal locking weaks to get pulled in alwaysTimo Teras2010-05-071-0/+35
| | | | | | | | | | | Linker is smart and does not pull in weaks.os, ever. This happens because that compilation unit does not get strong references and ld eliminates dead code. We really need the weaks for static build in a compilation unit that is always there, otherwise it won't work. Signed-off-by: Timo Teras <timo.teras@iki.fi> Acked-by: Roman I Khimov <khimov@altell.ru> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Merge commit 'origin/master' into nptlAustin Foxley2010-04-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile.in extra/Configs/Config.in libc/sysdeps/linux/common/bits/kernel-features.h libc/sysdeps/linux/common/poll.c libc/sysdeps/linux/common/sysdep.h libc/sysdeps/linux/sh/sysdep.h Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * prettify make cleanBernhard Reutner-Fischer2010-03-251-2/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge commit 'origin/master' into nptlAustin Foxley2010-02-051-4/+2
|\| | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
| * __uClibc_main: use __pagesize to protect against recursionBernhard Reutner-Fischer2010-02-031-4/+2
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge commit 'origin/master' into nptlKhem Raj2010-02-011-3/+2
|\| | | | | | | | | | | | | Conflicts: libc/stdlib/Makefile.in Signed-off-by: Khem Raj <raj.khem@gmail.com>
| * errno: hide __libc_resp, __libc_errno, and __libc_h_errnoKhem Raj2010-02-011-3/+2
| | | | | | | | Signed-off-by: Khem Raj <raj.khem@gmail.com>
* | Merge branch 'master' into nptlCarmelo Amoroso2010-01-251-2/+3
|\| | | | | | | | | | | | | | | | | | | Conflicts: libc/inet/Makefile.in libc/inet/hostid.c Synchronise nptl branch with master branch @ c4b750195714ec7c10aa4de15610c5aae0751c1c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
| * silence some warnings about unused paramsBernhard Reutner-Fischer2010-01-231-2/+3
| | | | | | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | define local stack_chk_guard for nptlNatanael Copa2009-11-271-1/+2
| | | | | | | | | | Signed-off-by: Natanael Copa <natanael.copa@gmail.com> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | make the sem_open changes actually compileAustin Foxley2009-11-092-2/+2
| | | | | | | | | | | | __gen_tempname now needs to not be hidden so libpthread can get at it Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | Extend __gen_tempname with mode argumentMikhail Gusarov2009-11-092-8/+9
| | | | | | | | | | | | | | | | | | | | sem_open(3) needs to create a temporary file in a way which can't be efficiently implemented in terms of POSIX API. Extend __gen_tempname with mode_t mode argument in order to ease sem_open implementation. Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | whitespace fixesAustin Foxley2009-10-171-1/+1
| | | | | | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* | uClibc_main: add the needed support for nptlAustin Foxley2009-10-171-34/+75
|/ | | | | | | | * setup memory for the cancellation buffer * remove unneeded weak's * deallocation of tsd on main thread exit Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* errno.c: add tls versions of errno and h_errnoAustin Foxley2009-09-262-1/+15
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* convert // comments to /**/; remove empty #if/#endif pairs. no code changesDenys Vlasenko2009-09-183-11/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* trim Experimentally off and uncommented hiddenBernhard Reutner-Fischer2009-09-185-24/+0
| | | | | | | | sed -i -e '/Experimentally off - /d' $(grep -rl "Experimentally off - " *) sed -i -e '/^\/\*[[:space:]]*libc_hidden_proto(/d' $(grep -rl "libc_hidden_proto" *) should be a nop Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* support building out-of-treeBernhard Reutner-Fischer2009-08-171-0/+2
| | | | | | Handle O= Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* *: remove some __libc_XXX functions:Denis Vlasenko2008-12-101-5/+3
| | | | | | | | | | | | __libc_accept __libc_close __libc_connect __libc_creat __libc_creat64 __libc_fsync __libc_lseek __libc_lseek64 __libc_msync __libc_nanosleep __libc_open __libc_open64 __libc_pause __libc_read __libc_readv __libc_recv __libc_recvfrom __libc_recvmsg __libc_send __libc_sendmsg __libc_sendto __libc_tcdrain __libc_wait __libc_waitpid __libc_write __libc_writev They were removed from glibc 1 May 2004: http://sources.redhat.com/ml/libc-hacker/2004-05/msg00001.html
* remove __libc_fcntl[64]Denis Vlasenko2008-12-101-4/+2
|
* fix some unneeded PLT referencesDenis Vlasenko2008-11-221-1/+4
|
* Last portion of libc_hidden_proto removal.Denis Vlasenko2008-11-205-11/+11
| | | | | Appears to build fine (several .configs tried)
* next portion of libc_hidden_proto removalDenis Vlasenko2008-11-202-7/+7
|
* Move _dl_iterate_phdr into libc.so.0 and libc.a (as glibc does).Carmelo Amoroso2008-11-181-3/+13
| | | | | | Currently we have an implementation in ld.so and libdl.a. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* libc_hidden_proto removal, just a few functionsDenis Vlasenko2008-11-182-3/+3
|
* - less verbose make cleanBernhard Reutner-Fischer2008-11-071-4/+4
|
* - use c89-style commentsBernhard Reutner-Fischer2008-10-031-1/+1
| | | | Closes issue #5194
* - trim any trailing whitespaceBernhard Reutner-Fischer2008-07-231-2/+2
|
* if argv[0] is NULL, dont try to parse it and subsequently crash ... found by ↵Mike Frysinger2008-06-271-6/+8
| | | | running execve05 ltp test on blackfin ([#4194])
* __uClibc_main.c: save ~70 bytes by not checking that /dev/nullDenis Vlasenko2008-05-251-9/+7
| | | | | | | | | | | is indeed a char device with correct (maj,min). (If it's not such a char device, the system is screwed anyway, nothing can be done about it...) text data bss dec hex filename - 715 4 21 740 2e4 libc/misc/internals/__uClibc_main.o + 644 4 21 669 29d libc/misc/internals/__uClibc_main.o
* Introduce and use small[u]int type. Changes in size:Denis Vlasenko2008-05-201-2/+1
| | | | | | | | | | | | | | - 79 0 28 107 6b libc/inet/rpc/create_xid.o + 76 0 25 101 65 libc/inet/rpc/create_xid.o - 126 0 4 130 82 libc/misc/assert/__assert.o + 123 0 1 124 7c libc/misc/assert/__assert.o - 648 4 24 676 2a4 libc/misc/internals/__uClibc_main.o + 645 4 21 670 29e libc/misc/internals/__uClibc_main.o - 230 0 4 234 ea libc/stdlib/abort.o + 216 0 1 217 d9 libc/stdlib/abort.o - 129 0 4 133 85 libc/termios/tcgetsid.o + 126 0 1 127 7f libc/termios/tcgetsid.o