summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-01-26buildsys: turn off forced EXTRA_WARNINGS on i386Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-26*: silence some warningsBernhard Reutner-Fischer
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-26syscall: flag ia64 syscall error path as unlikelyBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-26arm: tweak commentBernhard Reutner-Fischer
harmless copy'n paste error Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-23libc: fix signal handling in system()Richard Braun
When built without NPTL support (or for a sparc target), the system() function doesn't conform to its specification. Namely, it uses signal() to install/save/restore signal handlers, which may break applications using custom handlers installed with sigaction(). In addition, it resets the SIGCHLD handler to SIG_DFL instead of blocking the signal, which may result in "lost" signals if a custom handler was installed. Fix system() by replacing uses of signal() with appropriate calls to sigaction() and sigprocmask(). Signed-off-by: Richard Braun <rbraun@sceen.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-23ldso/mips: fix symbol lookup for JUMP_SLOT and COPY relocationsCarmelo Amoroso
Fill properly the sym_ref fields when invoking _dl_find_hash to lookup symbols Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-01-23libdl: fix dlclose handling of symbol scopeCarmelo Amoroso
Defer removal of the local scope of a dl-opened library after all the destructors (of itself and related dependencies) are actually get unloaded, otherwise any function registered via atexit() won't be resolved. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
2012-01-23Rules: Check for CROSS_COMPILE to be emptyKhem Raj
In some case where CROSS is defined to be empty we define CROSS_COMPILE ?= CROSS so at this point it will be defined but will be empty so check for the same Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-01-23libubacktrace: Add arm implementationKhem Raj
Arm has a different mechanism of getting _Unwind_GetIP. Therefore we provide arch specific backtrace file. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-01-23mips/libdl: Apply relocations after appending the new scopeKhem Raj
Without this the relocations for the current shared object are not resolved since the scope is not added to map yet Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-01-18i386/sigaction.c: slightly more readable form of [rt_]sigreturn definitionsDenys Vlasenko
No code changes Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2012-01-18stubs: mark stubs as usedBernhard Reutner-Fischer
Avoids warning from -Wunused-function about the alias target that is only used at link-time. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18stdlib: use shorhand wur for realloc prototypeBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18buildsys: add cppcheck wrapper scriptBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18libcrypt: shrink crypt() again - unmodulariseBernhard Reutner-Fischer
modularisation added too much bloat for no benefit, undo. $ ../busybox/scripts/bloat-o-meter .lib.05/libcrypt-0.9.33-rc1-git.so lib/libcrypt-0.9.33-rc1-git.so function old new delta crypt 130 46 -84 .rodata 2704 - -2704 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-2788) Total: -2788 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18nptl: .gitignore generated pt-crt{i,n}.SBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18tests: only test crypt if we have an implBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18tests: add sha356/512 testsBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-18tests: silence warnings in cryptBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-17buildsys: use = for --sort-section linker flagMike Frysinger
The spaces aren't handled correctly (currently) when outputting the CFLAGS version of the linker flag. Reported-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-17tests: mark all helper scripts +xMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16buildsys: handle more clean targetsMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16buildsys: fix handling of CFLAG_-W{a,l} varsMike Frysinger
Need a little indirection/delayed evaluation to handle variables with equal signs and commas in them. Reported-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16tests: tst-futimens1: add missing mode args to open()Mike Frysinger
Since we use O_CREAT with open(), need to make sure to pass in mode too. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16tests: test-canon: include sys/stat.h for mkdir()Mike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16tests: fdopen: add missing mode args to open()Mike Frysinger
We call open() with O_CREAT, so make sure we pass in the mode else we might get build errors with fortify source. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16tests: opendir-tst1: add header for mknod()Mike Frysinger
Include sys/stat.h for mknod() prototype. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16tests: mmap2: ignore permission denied errors on /dev/memMike Frysinger
Non-root users can't open /dev/mem, so it makes it hard to pass. Ignore that case. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16buildsys: skip compiler flag checking for clean targetsMike Frysinger
As suggested by Bernhard, there is no point in evaluating the compiler's flag availability when cleaning, so skip things in that case. If there are variables that change targets based on the flags, then things are already broken and need fixing independently. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-16mips/dlfcn.h: Disable RTLD_DEEPBINDKhem Raj
RTLD_DEEPBIND is not supported in uclibc Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-01-15buildsys: simplify include_clean greatlyMike Frysinger
Since we want to clean out all the headers we symlinked into include/, just use `find` to locate all the symlinks for us. This simplifies it greatly, and actually fixes bugs where we build for one arch, switch to another, and then do a clean but the previous arch headers are left behind. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-15buildsys: fix detection of silent makeMike Frysinger
The MAKEFLAGS variable contains all the flags without the leading dash. From the GNU make manual: This variable is set up automatically by make to contain the flag letters that make received. Thus, if you do ‘make -ks’ then MAKEFLAGS gets the value ‘ks’. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-15tests: skip redundant -Wstrict-prototypes setupMike Frysinger
We inherit the top-level Rules.mak which sets up this flag for us, so just rely on that. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-15libc: build abort with unwind-info for backtraceBernhard Reutner-Fischer
If backtrace support is turned on, build raise() and abort() with unwind info (fixup 4c9b7f3c21ff21c199e54bfad2fdf3445fa4573d). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-14linuxthreads/signals: do not restore handler for invalid signalMarkos Chandras
Invalid signals have no handlers so when trying to restore the old handler to a bad signal a SIGSEGV occurs. This is because the library tries to store the old handler to an invalid memory area where it things the bad signal lives. URL: https://bugs.busybox.net/show_bug.cgi?id=4640 Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-14buildsys: cache build flags in varsMike Frysinger
Running `make clean` atm takes like 20 seconds because every subdir re-evaluates all the toolchain flags. Add some helpers to automate the process of setting up variables to cache the result of tests, as well as the checking of an already set flag. Now `make clean` takes like 2 seconds on my system. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-13libubacktrace: use -asynchronous-funwind-tables rather than -funwind-tablesCarmelo Amoroso
From gcc documentation, we can read: " ... -fasynchronous-unwind-tables Generate unwind table in dwarf2 format, if supported by target machine. The table is exact at each instruction boundary, so it can be used for stack unwinding from asynchronous events (such as debugger or garbage collector) ..." So it seems better rather than using -funwind-tables (glibc seems to prefer -fasynchronous-unwind-tables). Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-01-13libc: allow to backtrace out of abort callCarmelo Amoroso
Build raise and abort function with dwarf2 info by using -fasynchronous-unwind-tables to make backtrace() working across a call to abort. A scenario where it could be useful is within a signal handler that wants to dump a backtrace when catching some signal (i.e SIGABRT). Without having abort & raise built with DWARF2 information, it is not possible for the libgcc stack unwinder to walk through the call stack out of the abort/raise function. Impacts in terms of size are really limited Current text data bss dec hex filename 164 0 0 164 a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os 164 0 0 164 a4 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS 220 24 4 248 f8 ./libc/stdlib/abort.os With (-fasynchronous-unwind-tables) text data bss dec hex filename 216 0 0 216 d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.os 216 0 0 216 d8 ./libpthread/nptl/sysdeps/unix/sysv/linux/raise.oS 280 24 4 308 134 ./libc/stdlib/abort.os Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-01-02config: remove some redundant words in the menusMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-02ldso: setup search path even when there are no "/"Mike Frysinger
If people use an interp path such as "ld.so", then there is no "/" found, and we end up dereferencing a NULL pointer. Simplify the logic by having a relative interp path like that be the same as "" (which the code later on interprets as $PWD). While we're here, document some of the nuances of this code. Reported-by: Ignacy Gawędzki <uclibc@qult.net> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-02ldso: simplify interp path search logicMike Frysinger
The setup logic is duplicated, so unify it in a local func. Mark the variable const while we're doing this, and add missing ifdef protection to the header that declares it availability. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-01-01getpass: s/sizeof(buf)-1/sizeof(buf)/ in fgetsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-12-30bump version to 0.9.33-rc1-gitBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-30release 0.9.33-rc1Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-23getpass: several fixesDenys Vlasenko
fixes bogus fgets error check fixes bogus strlen() < 0 check switches off buffering regardless of tcgetattr() success prints newline even on error or if there was no '\n' on input uses sizeof(buf) instead of PWD_BUFFER_SIZE Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2011-12-22libubacktrace: use -funwind-tables rather than -fexecptionsCarmelo Amoroso
For backtrace to work is enough to use -funwind-tables instead of -fexceptions. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-12-22libcrypt: add support for SHA256-CRYPT password hashingWilliam Pitcock
This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work in uClibc. The differences from the GLIBC version are as follows: - b64_from_24bit() has been converted into a macro - Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed It is enabled by the UCLIBC_HAS_SHA256_CRYPT_IMPL configuration symbol. You must have UCLIBC_HAS_CRYPT_IMPL enabled as well. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-22libcrypt: add support for SHA512-CRYPT password hashingWilliam Pitcock
This is based on Ulrich Drepper's implementation in GLIBC, but hacked up to work in uClibc. The differences from the GLIBC version are as follows: - b64_from_24bit() has been converted into a macro - Usage of GLIBC-isms (such as libc_freeres_ptr) have been removed It is enabled by the UCLIBC_HAS_SHA512_CRYPT_IMPL configuration symbol. You must have UCLIBC_HAS_CRYPT_IMPL enabled as well. Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-22libcrypt: make crypt() itself more modularWilliam Pitcock
By using a function table, we can more cleanly support new crypt implementations, such as SHA256 ($5$) and SHA512 ($6$). Signed-off-by: William Pitcock <nenolod@dereferenced.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-12-22libdl: rudimentary locking for dlopen/dlsym/dlcloseTimo Teräs
This implements big-dlfcn lock to allow multithreaded usage of dlopen/dlsym/dlclose. We should really clean up the dl code so we can use more fine grained locking or even RCU where appropriate. But at least we won't crash now. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>