Age | Commit message (Collapse) | Author |
|
They expand into the same code, but using the ELF_xxx()/ElfW() macros
makes it much easier to spot similarities between code bases.
Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Some test results:
The longer patch posted at Sun 14:46:24 +0100 made my target system
unbootable. I did not attempt to troubleshoot it, as we are focusing
our efforts on the shorter patch now.
The shorter patch posted at Mon 01:50:27 +0100 is a good start, but it
didn't completely fix the problem for me. I am posting an updated
version with a few changes at the end of this message; the patched
uClibc 0.9.32.1 tree passes both of my test cases.
My changes:
1) Need to break out of the loop on "hard" errors. Otherwise the
library call never returns:
open("/dev/null", O_RDONLY) = 4
dup2(4, 1) = 1
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
write(1, "hello world\n", 12) = -1 EBADF (Bad file descriptor)
...
2) Move all of the error handling logic back into the "else" clause. In
particular, I believe we do not want to be checking errno unless
__WRITE() had indicated a failure, since the value may be undefined:
if (errno == EINTR
|| errno == EAGAIN
/* do we have other "soft" errors? */
) {
3) Whitespace/indentation consistency.
-- 8< --
From: Denys Vlasenko <vda.linux@googlemail.com>
Currently, uclibc retains buffered data on stdio write errors,
and subsequent fclose and fflush will try to write it out again
(in most cases, in vain).
Which results in something like this:
On Wednesday 26 January 2011 13:21, Baruch Siach wrote:
> Hi busybox list,
>
> I'm running the following command under strace (thanks Rob):
>
> echo 56 > /sys/class/gpio/export
>
> and I see the following output:
>
> write(1, "56\n", 3) = -1 EBUSY (Device or resource busy)
> write(1, "5", 1) = 1
>
> The first EBUSY is OK, since GPIO 56 is already requested. But the second
> write() attempt seems strange, and leads to an unwanted outcome. GPIO 5 gets
> exported.
This patch prevents that.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Ismael Luceno <ismael.luceno@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
A microblaze-specific sys/user.h is needed for (e.g.) strace,
so use this version from glibc.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The tpnt field is already set, so not needed to assign it again.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
gcc 4.6.x raises useful warnings due to unused-but-set-variable,
This patch fixes the following one by using properly preprocessor
guard
In file included from ldso/libdl/libdl.c:129:0:
./ldso/ldso/sh/elfinterp.c: In function '_dl_do_reloc':
./ldso/ldso/sh/elfinterp.c:163:22: warning: variable 'tls_tpnt' set but not used [-Wunused-but-set-variable]
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Pulled assignments out of ifs.
do {...} while (1); is a weird method of writing "loop forever",
thus rewrote it.
No code changes: objdump output is the same.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Should make adding more knob control simpler as people only need
to modify one variable now (librt_filter_SRC).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
-r is not available on BSD sed so to keep
compatibility avoid using it.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Rename libm-test-ulps-sh4 to libm-test-ulps-sh as the ULPS file
is expected to match pattern libm-test-ulps-$(TARGET_ARCH).
Indeed "sh4" is the TARGET_SUBARCH.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Test case to trigger an issue raised by the new symbol scope design,
that was erroneously removing local symbol scope from the global one
too early while dl-closing a shared library.
Based on original test-case by Khem Raj
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Reported-by: Khem Raj <raj.khem@gmail.com>
|
|
Since commit a899b909, variable LDFLAGS_GNUHASH has been replaced
by CFLAG_-Wl--hash-style=gnu. This change has not been reported to
the tests buildsys.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Add OMIT logic to remove compilation flags when compiling libraries,
binaries( both host and target)
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
This is a port of glibc's fix by Zack Weinberg as reported
in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=142312,
and discussed in http://sourceware.org/ml/libc-alpha/2002-04/msg00069.html
and following.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
This is needed for stat'ing loop devices > 255
since otherwise kernel returns EOVERFLOW becasue
it needs st_rdev/st_dev to be larger than 16bits but
in kernel it uses __old_kernel_stat for stat
syscall which has st_rdev/st_dev as unsigned short
Add a testcase
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
use it
Signed-off-by: Khem Raj <raj.khem@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: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
A couple of sig functions are obsolete in SUSv4.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
pthread_getconcurrency / pthread_setconcurrency is OBSOLETE in SUSv4
so disable pthread debug support too
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: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Dummy symbol is __aeabi_unwind_cpp_pr is part of uclibc_shared.a
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Also incooperate vapier's suggestion on how to set REAL_CC once
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Do not pollute libraries with its own implementation of __aeabi_unwind_cpp_pr1 code.
Just add it to uclibc_nonshared.a archive and share it.
This fixes build issue with static linking of application due to multiple symbol
definition in libgcc_eh-a and libpthread.a or librt.a
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
The double slash variants are not documented (doc bug?) so better use
the single slash variants like we usually do.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
harmless copy'n paste error
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
No code changes
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
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>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
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>
|