Age | Commit message (Collapse) | Author |
|
This adds a straight forward implementation for obstack_printf and
obstack_vprintf on uClibc's already existing obstack_grow and
vasprintf. It does not attempt to port over glibc's implementation
in terms of _IO_* structs and functions.
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
$* is no longer supported at extra/scripts/relinfo.pl line 2.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
valloc uses memalign
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
This reverts commit e567c399ff86d007d8c4586f0dd5e0ca61e283ca.
since it breaks badly (e.g. busybox netstat)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Mischa Jonker <mjonker@synopsys.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
to silence warning
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Silence warning about shadowing wait
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
Some tests use fd, rename the one in the skeleton.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
silence warnings about unused parameters
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
for consistency
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
cosmetics
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|