summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-06-15remove __FORCE_GLIBCPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15getopt.c, getopt.h: avoid the need for __FORCE_GLIBCPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15do not include libc-internal.hPeter S. Mazinger
it is already included by features.h Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15locale.h, xlocale.h: guard *locale functions correctlyPeter S. Mazinger
change the guard from LOCALE to XLOCALE for uselocale/newlocale... move locale_t to xlocale.h Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15do not include xlocale.h, it is included by locale.h when neededPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15signal.h: disable sigvec() and guard related stuff with STRICT_HEADERSPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15time.h: update and guard internalsPeter S. Mazinger
guard internal constant with _LIBC strftime_l is SuSv4 reorder a bit to ease syncing with glibc Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15inet_addr.c, inet_makeaddr.c: used the correct section from addr.cPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15rpc_msg.h: move xdr_accepted_reply and xdr_received_reply from rpc.hPeter S. Mazinger
glibc does not provide these prototypes libtirpc provides them in rpc_msg.h, copied comments from there Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15crypt.h: use __const instead of constPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15no need for hidden inet_ntoa_rPeter S. Mazinger
it is reused within the same file, solve it through a static function Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15remove unneeded hiddens for rtime, basename, strtof* and wcstof*Peter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15dirent.h: disable getdirentries not provided by uClibcPeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15dirent.h: s:__XOPEN_2K8:__USE_XOPEN2K8:Peter S. Mazinger
glibc has it wrong as well Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15wordexp.c, sysconf.c: include ctype.h for isspacePeter S. Mazinger
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-15ldso: use .arm mode for resolver unconditionallyBernhard Reutner-Fischer
as per comment in the file. Fixes runtime with __THUMB_INTERWORK__ enabled. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-14libc: sh: fixed typo in ucontext headerFilippo Arcidiacono
Fixed typo in ucontext header, NFPREG wrongly defined twice instead of NGREG for general registers and NFPREG for floating point register. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2012-06-13buildsys: prune pthread bits from arch headersBernhard Reutner-Fischer
Pickup the correct version of e.g. local_lim.h as seen on ppc Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-13buildsys: clean up libubacktrace linker script handlingKevin Cernekee
Currently, the installed libubacktrace linker script entry always uses HARDWIRED_ABSPATH semantics, even if HARDWIRED_ABSPATH is disabled: $ grep GROUP $PREFIX/mipsel-linux-uclibc/sys-root/usr/lib/libc.so GROUP ( libc.so.0 uclibc_nonshared.a AS_NEEDED ( ld-uClibc.so.0 ) ) GROUP ( AS_NEEDED ( /lib/libubacktrace.so.0 ) ) This causes problems when building a non-sysroot toolchain. Move the AS_NEEDED insertion into libc/Makefile.in, and add a case to the HARDWIRED_ABSPATH substitution command so libubacktrace is handled the same way as the other libraries listed in the script. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-13Update C6X supportMark Salter
This patch updates the C6X support to work with latest uClibc code and uses reworked DSBT support to allow using kernel FDPIC loader. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-11libubacktrace: arm: Fix typo in assertBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-11buildsys: fix typo in helpBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-10eventfd: Implement eventfd2 and fix eventfdKhem Raj
eventfd: evntfd assumes to take two arguments instead it should be one evntfd expects two therefore implement both syscalls with correct parameters Thanks Eugene Rudoy for reporting it and also providing the patch Signed-off-by: Khem Raj <raj.khem@gmail.com>
2012-06-06MIPS: Use $a0 instead of $v0 for __syscall_error() argumentKevin Cernekee
$a0 is saved across _dl_runtime_resolve(); $v0 is not. Unfortunately, __syscall_error() uses $v0 for its argument, not $a0 as is the MIPS ABI standard. This means that if lazy binding was used for __syscall_error(), the errno value in $v0 could get corrupted. The problem can be easily seen in testcases where syscalls in librt fail; when librt tries to call __syscall_error() in libc, the argument gets lost and errno gets set to a bogus value: # ./tst-mqueue1 ; echo $? mq_receive on O_WRONLY mqd_t did not fail with EBADF: Unknown error 2004684208 1 # ./tst-mqueue2 ; echo $? mq_timedreceive with too small msg_len did not fail with EMSGSIZE: Unknown error 1997360560 1 # ./tst-mqueue4 ; echo $? mq_timedsend did not fail with ETIMEDOUT: Unknown error 2008747440 1 When _dl_runtime_resolve() was taken out of the equation, the same test cases passed: # LD_BIND_NOW=y ./tst-mqueue1 ; echo $? 0 # LD_BIND_NOW=y ./tst-mqueue2 ; echo $? 0 # LD_BIND_NOW=y ./tst-mqueue4 ; echo $? 0 Changing __syscall_error() to look at $a0 instead of $v0 fixed the problem. (Note that there is also a "__syscall_error.c" file which presumably uses the standard C calling conventions, but I do not think it is used on MIPS.) Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-06MIPS: Convert __syscall_error() callers to use $a0 for argumentKevin Cernekee
Some callers passed the first argument in $v0, while others used $a0. Change the callers to use $a0 consistently. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-06ldso: preload standard path library with setuid bit setFilippo Arcidiacono
For set-user-ID/set-group-ID ELF binaries, only libraries in the standard search directories that are also set-user-ID must be loaded. This patch fixes existing logic according to the above statement. Furthermore if either library setuid bit isn't set or it cannot be found in the standard search path, the library won't be preloaded but execution go ahead with default one. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-06-06Clean up DSBT supportMark Salter
The existing DSBT support relies on the kernel to provide DSBT info as part of the load maps passed to user space. The problem with this approach is that the DSBT info is in the dynamic section, so the kernel must access a userspace mapping of the dynamic section (or separately read a copy for the kernel) in order to retrieve the information needed by userspace. This patch reworks the DSBT support to remove the reliance on DSBT info coming from the kernel. Instead, ldso reads the info itself from the dynamic section. One other benefit of this is that it allows the existing kernel FDPIC loader to also load DSBT binaries. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-30pread/pwrite: drop fallback funcsMike Frysinger
Linux has provided these functions since the 2.1.x era, so no need to keep these around. We'd rather find out when things are missing (and fix that) than fall back to the unsafe hacks. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-30pread/pwrite: handle renamed syscalls in common/ppc/xtensa codeMike Frysinger
Some arches got this fix, but many did not. So copy the ifdef logic to the ones that missed it to fix behavior in linux-2.6+. URL: https://bugs.busybox.net/show_bug.cgi?id=5258 Reported-by: David Laight <david.laight@aculab.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-21Makerules: Remove duplicated slashes in interp.cSedat Dilek
Peter Mazinger says in [1]: "I can revert it to the old behaviour in master (the change s://:/: should stay though)." [1] http://lists.uclibc.org/pipermail/uclibc/2011-March/045049.html Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-21Revert "Makerules: respect HARDWIRED_ABSPATH in interp.c"Sedat Dilek
This reverts commit 5dffed7dd1a413f3965af702fa7ecd79809d1988. This breaks ldd when HARDWIRED_ABSPATH=n. [1] http://lists.uclibc.org/pipermail/uclibc/2011-March/045048.html From: Timo Teräs <timo.teras@iki.fi> Your commit 5dffed7dd1a413f3965af702fa7ecd79809d1988 removed absolute path from the interpreter binary name embedded in ELF files. This makes ldd seg.fault as it seems to assume absolute paths. gdb sayeth: (gdb) where #0 0x00111ae3 in find_elf_interpreter (ehdr=0xb7a74000) at ../utils/ldd.c:556 #1 0x00111f2a in find_dependencies (filename=0x114910 "/home/fabled/aports/main/libc0.9.32/src/uClibc-0.9.32-rc3/lib/librt.so.0.9.32") at ../utils/ldd.c:676 #2 0x0011228e in main (argc=1, argv=0xbffff6e8) at ../utils/ldd.c:777 (gdb) p tmp tmp = NULL (gdb) p interp_dir $1 = 0x116660 "ld-uClibc.so.0.9.32" [2] http://lists.uclibc.org/pipermail/uclibc/2011-March/045054.html From: Mike Frysinger <vapier@gentoo.org> On Wed, Mar 23, 2011 at 7:18 AM, Peter Mazinger wrote: >> Your commit 5dffed7dd1a413f3965af702fa7ecd79809d1988 removed absolute >> path from the interpreter binary name embedded in ELF files. > > do you consider my patch wrong? yes. the absolute path to the ldso must be encoded in binaries. the point of HARDWIRED_ABSPATH is purely for sysroot/non-sysroot toolchain, and the interp path isnt involved with that. are you sure this even works at runtime ? i'm pretty sure the kernel doesnt do any path lookups on the interp string. Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-21mmap()->sys_mmap2: do unsigned shift of offsetJames Hogan
Fix the implementation of mmap based on the mmap2 system call, to construct pgoffset from offset with an unsigned shift rather than a signed (off_t) shift. The mmap2 test in the testsuite catches this case by mmap'ing with a large offset (with the sign bit set). The signed shift repeats the sign bit making the page shift way out of range. This is already fixed similarly in mmap64(). Signed-off-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-21stdio: implement assignment-allocation "m" characterMike Frysinger
The latest POSIX spec introduces a "m" character to allocate buffers for the user when using scanf type functions. This is like the old glibc "a" flag, but now standardized. With packages starting to use these, we need to implement it. for example: char *s; sscanf("foo", "%ms", &s); printf("%s\n", s); free(s); This will automatically allocate storage for "s", read in "foo" to it, and then display it. I'm not terribly familiar with the stdio layer, so this could be wrong. But it seems to work for me. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-18ldso: sh: handle _dl_skip_args in linker startup instead of __uClibc_mainFilippo Arcidiacono
Handle _dl_skip_args in the asm part of the dynamic linker startup, to skip the ldso arguments, so we can keep this symbol hidden as other archs do. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2012-05-15ldd: tweak whitespaceBernhard Reutner-Fischer
Tweak whitespace in preprocessor conditionals. No obj-code changes. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-09Revert "help: Document CROSS="Bernhard Reutner-Fischer
This reverts commit 5e0dbdb9e5acdcf7dea29335a5db065f48c58766. CROSS is only a compat thing and should not be advertised Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-08ldd.host: Fix compilation for STANDALONE supportBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-08help: Document CROSS=Bernhard Reutner-Fischer
should maybe better read "override CROSS_COMPILE from above" Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-08help: Document BUILD_CFLAGS and BUILD_LDFLAGSBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-08utils: pass in config flags for lddBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-08ldd: silence warning if !LDSO_LDD_SUPPORTBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-05linuxthreads.old: fix build warnings with epoll enabledMike Frysinger
Pull in the epoll header for the epoll structs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-05drop support for old systems lacking vforkMark Salter
Only really old systems (<=linux-2.0) lack a dedicated vfork system call. The code that is in place to support them is causing issues with newer arches that also don't provide a vfork system call -- instead, they do vfork by calling clone in userspace. If anyone cares about these really old systems, they can submit a patch to make the system work with them while not breaking newer systems. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-05docs: restore crt from old svn treeMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-05-03config: tweak STRICT_HEADERS descriptionBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-03rpmatch: provide out-of-line implementationBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-03rpmatch: make decl parsableBernhard Reutner-Fischer
Mike, it would have been much simpler to just leave the header impl-free Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-02rpmatch: fix previous commit w/C++ compilersMike Frysinger
The throw markings on the inline func trigger errors when building with C++. Since this inline version doesn't throw any exceptions, just drop the markings completely and be done with it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-30rpmatch: simple inline versionMike Frysinger
Since rpmatch will match ^[Yy] and ^[Nn] regardless of locale, this lets us create a simple inline version. Newer procps versions use this function. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-28epoll.h: sync with glibcMike Frysinger
Since glibc has split out arch-specific stuff to bits/epoll.h, we can pull that sanity back into our tree and drop the arch ifdefs. Signed-off-by: Mike Frysinger <vapier@gentoo.org>