summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-06-14config: UCLIBC_HAS_OBSTACK to optionally enable obstack supportAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-06-07eventfd.h: Use new "bits/" scheme for arch-specific flagsHiroaki KAWAI
As in timerfd.h, eventfd.h needs arch-specific definition files. alpha, mips and sparc needs separate file, all the other arch will use common definition. This problem is already fixed in glibc. Also sanitize and provide bits for hppa. Make sure not to install the new bits/eventfd unless eventfd support is enabled. Signed-off-by: Hiroaki KAWAI <kawai@stratosphere.co.jp> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-06-07ldso/libdl: Also include dl-tls.h for for !SHARED.Gregory Fong
On MIPS, several relocations that were original only resolved by the dynamic linker were reused as static relocations. Consequently the macros TLS_DTPREL_VALUE and TLS_TPREL_VALUE defined in libpthread/nptl/sysdeps/mips/dl-tls.h need to be available even for !SHARED. Relevant: http://www.linux-mips.org/wiki/NPTL#History Original patch by Vincent Wen <wenvincent@gmail.com>: http://lists.uclibc.org/pipermail/uclibc/2013-April/047707.html When build statically linked applications for MIPS platform, sometimes the linker fails with following errors: undefined reference to TLS_DTPREL_VALUE undefined reference to TLS_TPREL_VALUE The include of dl-tls.h is only in code guarded by SHARED, Removing the SHARED compilation option to cover static link too. Signed-off-by: Vincent Wen <wenvincent90@gmail.com> Signed-off-by: Gregory Fong <gregory.0xf0@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-06-07Reinstate hidden protos for config_{open,close,read}()Vineet Gupta
Partially reverts "parser_config.[ch]: remove duplicated hidden functions" There's a namespace collision for config_{open,close,read} functions between uClibc and Busybox. Callers in uClibc and busybox need to call their local variants. In case of static linking, both the variants need to be pulled in the final executable. Turns out that the existing hidden attribute is not enough for static linked Busybox where the linker treats these symbols as duplicate and pulls in only the local (Busybox's own) variants in the final link. This obviously causes the uClibc callers to crap out at runtime. This can be fixed by restoring the libc_hidden_proto() annotation which causes the libc variants to be aliased with __GI_ prefix thus making both the symbols distinct from linker's perspective. This issue was found with ARC gcc 4.8 + uClibc trunk. I can confirm the same thing with ARM uClibc buildroot build (when switching to uClibc daily snapshot). All the credit for debugging the issue goes to Anton,Joern and Jeremy - I simply found the cure :-) Signed-off-by: Vineet Gupta <vgupta@synopsys.com> Cc: Anton Kolesov <akolesov@synopsys.com> Cc: Jeremy Bennett <jeremy.bennett@embecosm.com> Cc: Joern Rennecke <joern.rennecke@embecosm.com> Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Cc: Peter S. Mazinger <ps.m@gmx.net> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-05-28libc: elf: explicitly include uClibc_page.h to make PAGE_SIZE visibleCarmelo Amoroso
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2013-05-28libubacktrace: fix build due to some typosFilippo Arcidiacono
Commit 71c10c484e7dc113396cccb7e503befb759c6346 broke libubactrace build due to some typos, so that backtrace.o[sS] were not built. This definetively fixes this problem. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2013-05-19i386: punt all config options that just control -marchMike Frysinger
You can set these yourself in your CFLAGS, and our list is incomplete and pointless (we agreed some time ago to stop doing this). We keep around CONFIG_[3456]86 because it is used to select between different optimized subdirs of handcoded assembly. Also take this opportunity to up the default to i686. If you're using an older cpu, then you can handle changing this yourself. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-05-13libubacktrace: fix backtrace for statically linked applicationFilippo Arcidiacono
libgcc_s.so's unwinder could not access unwind tables of statically linked binaries, so we really want to use _Unwind_* stuff from libgcc_eh.a. It required to build backtrace.c differentiating between shared and static case. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2013-05-13libdl: fix dlopen implementation from statically linked applicationFilippo Arcidiacono
Calling dlopen from statically linked application is actually broken, because _dl_find_hash enters into an infinite loop when trying to resolve symbols. In this case it doesn't need to extend the global scope, it is readyto be used as it is, because _dl_loaded_modules already points to the dlopened library. The patch also fixesi a typo in __LDSO_LD_LIBRARY_PATH__ macro, that was preventing to get the actual value of the LD_LIBRARY_PATH. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2013-05-13libc: deal with aux vect inside __uClibc_main only if !SHAREDFilippo ARCIDIACONO
It's not safe to use the aux vect inside __uClibc_main if we are running with shared libraries, because it could have been already modified. For example, if some constructor plays with environment variables by using unsetenv, the modifications done into the stack to unset an environment variable, have impacts on the aux vect due to the extra NULL entries added. Due to this, __uClibc_main is not able to detect where the aux vect starts, so all the entries that are used by __uClibc_main (AT_UID, AT_EUID, AT_GID, AT_EGID, AT_PAGESZ and possibly other arch specific) are impacted. Same side effect on the aux vect is caused by the ld.so when running a SUID program with some of the unsecure environment variables set, that will be unset by the ld.so itself. In order to fix this issue, it needs to handle aux vect entries into __uClibc_main only if SHARED is not defined. In SHARED case, libc refers to __dl_secure and _dl_pagesize as initialised by the ld.so where the aux vext is still untouched. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2013-04-07linux: pread/write: fix 64bit handlingMike Frysinger
The syscall on 64bit ports takes 4 args as there is no need to split up the value into two args. Add support for that to the common code. Once we fix that, the mips code can now leverage it for its 64bit and 32bit needs. However, we can't just drop it entirely yet because its n32 ABI needs special handling to treat it like a 64bit port. This does change the existing behavior which treats the n32 like a 32bit port, but we want to do this. In the future, we'll probably have to introduce a define for this as it currently affects x86_64/x32 and mips/n32. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-04buildsys: fix realcleanBernhard Reutner-Fischer
For anything but (toplevel) clean, CLEAN_%, we need .config Otherwise realclean would leave stuff behind that was not intended to survive. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-04-04add UCLIBC_SUSV2_LEGACY to hide vallocBernhard Reutner-Fischer
valloc was marked as LEGACY in SUSv2, removed from SUSv3 and later. TODO: Remove this (point people to memalign and it's successors?). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-04-04relinfo.pl: use correct interpreterBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-04-04relinfo.pl: silence warningBernhard Reutner-Fischer
$* is no longer supported at extra/scripts/relinfo.pl line 2. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-04-03stdlib: avoid relocationBernhard Reutner-Fischer
valloc uses memalign Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-04-01linux: pread/write: convert to SYSCALL_ALIGN_64BITMike Frysinger
The pread64/write64 syscalls have the 64bit register align issue for all arches. Use this new define so we can merge the powerc/xtensa versions back into the common code. SuperH is funky and also allows us to do this. We should be able to merge the mips version too, but that'll require someone to take a closer look as the current stuff doesn't look quite right. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-01linux: readahead: convert to SYSCALL_ALIGN_64BITMike Frysinger
The readahead syscall has the 64bit register align issue for all arches. Only mips was handling this though. Clean up the common readahead.c to use the SYSCALL_ALIGN_64BIT define so that we can throw away the mips version and make this work correctly on arm/ppc/xtensa. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-01linux: posix_fadvise: use new SYSCALL_ALIGN_64BITMike Frysinger
Now that we have a new SYSCALL_ALIGN_64BIT define for tracking the 64bit register shift behavior, use it. This allows us to delete duplicated arm/xtensa files, as well as drop a few arch ifdefs from common code. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-01linux: use OFF64_HI_LO rather than __LONG_LONG_PAIRMike Frysinger
This macro takes care of the shift/mask split for us, so no need to open code this ourselves and then use __LONG_LONG_PAIR. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-01mips: only define SYSCALL_ALIGN_64BIT for O32 ABIsMike Frysinger
The 64bit register alignment issue only affects the O32 ABI, so wrap the define accordingly. We don't want this being used for N32 ABIs. This doesn't directly affect the N64 ABI since these files wouldn't even be compiled for those targets (no need for the 32bit/64bit shim). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-01libc: rename TRUNCATE64_HAS_4_ARGS to SYSCALL_ALIGN_64BITMike Frysinger
The reason truncate64 takes 4 args on some arches is that their ABI requires 64bit values to be aligned on register pair boundaries. Since this alignment affects more than just truncate64, rename the define to properly document its purpose. This also allows us to expand it to the other impacted syscalls (which will be done in a follow up commit). Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-03-29Revert "_scanf.c: Implement 'm' modifier for 'c' and '[' conversions."Bernhard Reutner-Fischer
This reverts commit e567c399ff86d007d8c4586f0dd5e0ca61e283ca. since it breaks badly (e.g. busybox netstat) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-29_vfprintf.c: use 'fputws_unlocked(S, F)' instead of 'fputws(S, F)'Mirko Vogt
This eliminates a source of reproduceable freezes Signed-off-by: Mirko Vogt <dev@nanl.de> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-29inet: fix getting the nameserver from _res state after res_init.Felix Fietkau
Fixes displaying the nameserver in busybox nslookup. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-22libc: Fix common-generic stat.h for BEMischa Jonker
Signed-off-by: Mischa Jonker <mjonker@synopsys.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-22Fix some fragileness in dlopen/do_dlopen wrapper & worker pair.Nathan Sidwell
do_dlopen contains __builtin_return_address to determine from whence it was called, and uses that to determine which dynamic object's data it should use to start the search. (In the bug I was tracking, this related to whether the application's RPATH was used or not.) For that to work, it has to have been inlined into the wrapper function. As it happens, it wasn't being inlined. That's an unfortunate compiler behaviour, but it isn't wrong and shouldn't have caused dlopen to fail. This patch changes things so the wrapper function determines the return address, and passes it to the worker. If the worker's inlined, the generated code should be exactly the same as before. Signed-off-by: Nathan Sidwell <nathan@codesourcery.com> Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
2013-03-22Fix a problem with scanning wide chars.Nathan Sidwell
We found that the testcase int main (void) { wchar_t s[10]; memset (s, 0, sizeof (s)); int r = sscanf ("s", "%ls", s); printf ("%d\n", r); printf ("%ls\n", s); return 0; } printed 0 <blankline> rather than the expected 1 s The problem was the enum in _scanf.c, which has had a 'CONV_m' value inserted. The attached patch fixes the problem in __psfs_parse_spec by not presuming a particular displacement between the two sets of char-like conversion values. With this patch the above program produces the expected output. Signed-off-by: Nathan Sidwell <nathan@codesourcery.com> Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
2013-03-20inet: do not filter responses in res_queryTimo Teräs
Fixes bug #5342 res_query was silently rejecting responses against T_ANY DNS questions. Remove the type-filtering from res_query altogether. __dns_lookup is supposed to return the proper stuff that you asked for (and only that). Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-20inet: Fix LT{.old,} compilation due to res_icloseBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-20LT.old: add missing prototypesBernhard Reutner-Fischer
to silence warning Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-20rpc: silence warningBernhard Reutner-Fischer
Silence warning about shadowing wait Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-20test: fix non-O checkingBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14test: add missing top_srcdirBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14buildsys: remove calls to mktempBernhard Reutner-Fischer
Nowadays we should not be racy in this area anymore, so simplify generating temporary build-files. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14test: silence warning in skeletonBernhard Reutner-Fischer
Some tests use fd, rename the one in the skeleton. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14test: silence warning in testsuite.hBernhard Reutner-Fischer
silence warnings about unused parameters Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14test: update test-skeleton.cBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14libubacktrace: use libgcc_s.hBernhard Reutner-Fischer
for consistency Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14libc: switch several users to unlikely()Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14inet: res_nclose: free user-buffer, not global _resBernhard Reutner-Fischer
In res_iclose we were operating on the global _res even if called via res_nclose where we are supposed to operate on the user provided res_state. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14test: dlopen: fix misplaced buildsys hunkBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14buildsys: remove surplus slashes from test dir pathsBernhard Reutner-Fischer
cosmetics Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14buildsys: tweak KCONFIG_CONFIG exportBernhard Reutner-Fischer
0c3eb2da578bc7ba2e74d240e3249dce62ec725e moved KCONFIG_CONFIG around and that broke propagation of config-settings to the testsuite. Fix that. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14test: cater for configBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14test: compile test{,_glibc} adjacentBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14metag: Add NPTL supportMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14extra/locale: Mark __codeset_8_bit_t as packed for MetaMarkos Chandras
gen_ldc writes offsets into the __locale_mmap_t structure. This relies on the host system having the same struct offsets as the target. On Meta, the structs are always aligned to a multiple of 4 bytes, and for these targets it is required for the struct to be packed so that it is more likely to match the host system (typically x86 which does not align structs). Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14metag: Add support for loading shared objects into core memories.Markos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2013-03-14libm: Add support for the Meta architectureMarkos Chandras
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>