Age | Commit message (Collapse) | Author |
|
Extend the environment variables adding the LD_LIBRARY_PATH
if actually passed when doing shared library tracings through
the ld.so trace capability.
This is possible only using the system dynamic linker in stand-alone
mode to avoid any vulnerability.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
blame e9d74358093b61e2e597fa9e066ba0468df14cba
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The algorithm computing daylight saving time incorrectly adds a day for
each month after January for leap years. The clock shift from/to DST can
be delayed if the last Sunday of a transition month is exactly seven
days before the first of the following month.
This change adds a day for the February month only.
Signed-off-by: Guillaume Bourcier <guillaumebourcier@free.fr>
Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
A few arches want pread() defined, so move it to common code.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Nowhere do we define DYNAMIC_LOADER_IN_SIMULATOR, so drop the little bit
of code that depends on it. At least in the Blackfin case, we can run an
FDPIC ldso just fine under the simulator without hacks.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
microblaze can either be with mmu or without
If with, use elf rather than flat, and support shared libs
Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The linker does not set up the Small Data Area symbols,
_SDA_BASE_ and _SDA2_BASE_ so don't try to resolve them
Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This avoids warnings about type-punned pointers
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
If SuSv3 legacy support is disabled, then mktemp() isn't available, and
we end up getting a lot of build errors. So add a fallback built on top
of tempnam() since that currently cannot be disabled.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
gcc informed me:
In file included from ldso/ldso/ldso.c:46:0:
ldso/ldso/x86_64/elfinterp.c: In function '_dl_do_lazy_reloc':
ldso/ldso/x86_64/elfinterp.c:294:6: warning:
variable 'symtab_index' set but not used [-Wunused-but-set-variable]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
From email:
A warning for people who can be hit by the same or similar issue:
gcc 4.1.2 with -march=i486 here with -Os and even with -O2 or -O
is "optimizing away" the check
if (_stdio_term)
in libc/stdlib/_atexit.c
which results in a "call 0" and a segfault at exit
if you do not happen to link in stdio.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
text data bss dec hex filename
- 2915 0 0 2915 b63 libc/inet/ns_name_old.o
+ 2656 0 0 2656 a60 libc/inet/ns_name.o
- 958 0 0 958 3be libc/inet/ns_parse_old.o
+ 898 0 0 898 382 libc/inet/ns_parse.o
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This patch changes the build system so that all DNS resolver related
functions (ie, those starting with dn_, ns_ and res_) are only built if
UCLIBC_HAS_RESOLVER_SUPPORT is set. This means that the libc will lack
support for things that existed in the library before unless this new
config option is set. On the other hand, if users really need support
for resolver functions, they now get a more complete set, and the
library is smaller than before it is deselected.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
This struct is used for IPv4 as well, so only make the members
conditional that are purely used by IPv6.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
Some reordering of existing functions was necessary in order to provide
this functionality.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
There are build 'ifdef L_ns_parse'.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
One uses the other, so add them in one go.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
These are built '#ifdef L_ns_name'
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
This patch introduces a new config directive
'UCLIBC_HAS_RESOLVER_SUPPORT' and adds the new symbols conditionally.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
While reading this file, I found it rather confusing to relate the
"endif" lines to their opening counter-part. This patch adds comments to
most of these lines to denote what the actually do.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
"default n" is the default default. No need to mention it explicitly.
Signed-off-by: Daniel Mack <zonque@gmail.com>
|
|
Trivial fixes for these warnings:
CC ldso/libdl/libdl.oS
In file included from ldso/ldso/ldso.c:46:0:
ldso/ldso/mips/elfinterp.c:88:1: warning: no previous prototype for '__dl_runtime_pltresolve'
ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
ldso/ldso/ldso.c:475:5: warning: assignment makes pointer from integer without a cast
In file included from ldso/ldso/ldso.c:1097:0:
ldso/ldso/dl-elf.c: In function '_dl_load_elf_shared_library':
ldso/ldso/dl-elf.c:811:3: warning: assignment makes pointer from integer without a cast
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
check_match() relies on checking for (sym->st_value == 0) to see if the
symbol is undefined. This works reasonably well on most architectures,
such as ARM or i386:
$ readelf -s /lib32/libcap.so.2 | grep -E "\<malloc\>"
17: 00000000 0 FUNC GLOBAL DEFAULT UND malloc@GLIBC_2.0 (2)
However, on MIPS, libbfd puts nonzero data in the st_value field to
facilitate resetting the symbol's GOT entry if the library that defines
the symbol gets unloaded:
$ mipsel-linux-readelf -s libfoo.so | grep -E "\<malloc\>"
74: 00003140 0 FUNC GLOBAL DEFAULT UND malloc
This can cause check_match to report a false positive when examining the
external symbol reference. Consequently dlsym() will return a bad pointer
to the caller.
Use the special MIPS logic from glibc-ports-2.13 to avoid this situation.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
_dl_reltypes_tab[] is an array of pointers to constant strings:
Contents of section .data:
20000 01000000 02000000 00000000 00000000 ................
20010 70e50000 7ce50000 88e50000 94e50000 p...|...........
^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
(pointers are LE)
Contents of section .rodata:
e570 525f4d49 50535f4e 4f4e4500 525f4d49 R_MIPS_NONE.R_MI
e580 50535f31 36000000 525f4d49 50535f33 PS_16...R_MIPS_3
e590 32000000 525f4d49 50535f52 454c3332 2...R_MIPS_REL32
These pointers require relocation:
DYNAMIC RELOCATION RECORDS
OFFSET TYPE VALUE
00000000 R_MIPS_NONE *ABS*
0001fffc R_MIPS_REL32 *ABS*
00020010 R_MIPS_REL32 *ABS*
00020014 R_MIPS_REL32 *ABS*
00020018 R_MIPS_REL32 *ABS*
On MIPS, only GOT relocations are currently handled by ldso during
startup. The net effect is that when running with "LD_DEBUG=reloc",
ldso itself crashes before the program even starts. This is caused
by _dl_dprintf() dereferencing an unadjusted string pointer such as
0xe570.
This patch enables the missing relocations and allows LD_DEBUG to work
as designed.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
When debugging memory leaks with Valgrind, it is required that
dynamically loaded shared objects are not unloaded when a process exits,
otherwise symbols from those files aren't correctly resolved in
allocation traces. This patch adds the LDSO_NO_CLEANUP configuration
option to control this behaviour.
Signed-off-by: Richard Braun <rbraun@sceen.net>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Fix a build error triggered when LDSO_PRELOAD_FILE_SUPPORT is enabled
due to missing definition of 'st' variable.
Signed-off-by: Douglas Mencken <dougmencken@gmail.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Exposed by udev 171 which uses signalfd
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
UCLIBC_HAS_FLOATS and UCLIBC_HAS_FPU are denoting two different aspects.
UCLIBC_HAS_FLOATS covers the floating point operations which has nothing
to do if you have FPU or not.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
This is a post merge fix to address build issue when PRELINK
support is enabled.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
* origin/master:
libc: add missing lock initialization in vswprintf
libubacktrace: fix makefile clean target
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Unlike vsnprintf, vswprintf does not properly initialize locking
elements of FILE structure, which in some unfortunate cases can result
in lockups in _vfwprintf_internal.
Interesting, the initialization code was removed in
2a915734a32c5aec9a6a76c13bcb074d30e64171 at the same time as it was added
to vsnprintf.
Signed-off-by: Maksim Rayskiy <mrayskiy@broadcom.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Fix makefile lean target removing the old reference to the non
existing libubacktrace_ARCH_OUT variable.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
* origin/master: (61 commits)
fts: fix warning due to old-style function definition
ldso_tls: fix compiler warning due to missing cast
resolv: fix bug in res_init with ipv6 nameservers
config: Fix passing defconfig args
buildsys: pt-initfini.s depends on uClibc_config.h
libdl: search for ELF_RTYPE_CLASS_DLSYM in dlsym()
resolv: try next server on SERVFAIL
getaddrinfo: allow numeric service without any hints
bump version to 0.9.33-git
nptl/pthread: Correct path for machine specific pt-initfini.c
ctor/dtor nptl: Fix init and fini function compilation
Rules.mak: Rearrange appending UCLIBC_EXTRA_CFLAGS to CFLAGS
ARM: remove EABI/OABI selection
ARM: detect BX availibility at build time
ARM: #include <bits/arm_asm.h> where __USE_BX__ is used
ARM: transform the EABI/OABI choice into a boolean
ARM: remove sub-arch/variants selection from menuconfig
ARM: introduce blind options to select & force THUMB mode
ARM: reorder "Use BX" option
Fix __libc_epoll_pwait compile failure on x86
...
Conflicts:
ldso/libdl/libdl.c
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Fix compiler warning (as below) due to missign cast
In file included from ldso/ldso/ldso.c:42:0:
ldso/ldso/dl-tls.c: In function 'init_tls':
ldso/ldso/dl-tls.c:1028:24: error: initialization makes pointer from integer without a cast
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Thanks to Christian Krause <chkr plauener.de> for finding and fixing
this!
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Don't rely on argument-shuffling but use correct arguments in
the first place.
In bug#3589 Thomas Suckow writes:
The modified kconfig defines -D to be the same function as -d. In
addition -d does not take an argument and Config.in should be passed as
a non-option argument. The existing argument order appears to work on
distributions such as Fedora but chokes on Cygwin (newlib?).
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|