Age | Commit message (Collapse) | Author |
|
Previously, DL_OPENED flag was set in libdl only and never used.
Set it centralized in _dl_load_elf_shared_library() & use it in
both ld.so and libdl.
Additionally, rename it to DL_OPENED2 for clarity.
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
|
|
The FR-V port is really broken, and I have no emulator
or hardware for this platform. I tried to get some hardware
from RedHat, who made the FR-V port initially. Unfortunately
Fujitsi didn't agreed to sent me some of their unused spare
hardware lying @RedHat. As I invested some time to get stuff compiled,
I decided to add the code and may be anytime later I can gain
access to some emulator or hardware.
GDB simulator for FR-V doesn't support booting Linux AFAIK.
|
|
Implement single rtld_flags interpretation through all the
do_dlopen()/_dl_load_shared_library()/_dl_load_elf_shared_library()
calls chain.
This adds the ability to use the flags, passed to dlopen(), in all
underlaying functions and implement rtld_flags inheritance.
Saves a few bytes code.
Signed-off-by: Leonid Lisovskiy <lly.dev@gmail.com>
Signed-off-by: Waldemar Brodkorb <wbx@uclibc-ng.org>
|
|
An abort() is only generated when gcc does not implement
a trap handler for the target architecture.
This fixes the abort() generation. Latest gcc git master
also contains a trap handler for xtensa.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Walemar Brodkorb <wbx@uclibc-ng.org>
|
|
Enable ia64 in the menu.
Fix build for architectures withou ld.so support.
Fix syntax error in bits/byteswap.h.
|
|
|
|
|
|
Patch seen here:
http://lists.uclibc.org/pipermail/uclibc/2015-April/048892.html
|
|
|
|
There seems to be a bug in gold with static TLS at least on x86_64 (?)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
For avr32 we still use gcc 4.4 compiler, so exlude the usage
of __builtin_unreachable here.
|
|
|
|
Otherwise gcc might not understand that oom() ended control-flow and
might emit an (untaken) reference to abort() in _dl_update_slotinfo()
on e.g. SH4 which breaks linking ld-uClibc.so.
Arguably -ffreestanding should prevent GCC from emitting this
'.global abort' but alas, it does not, which is another bug..
Also mark the function cold to further lower the incoming frequency and
branch probability.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This is for example required, used and tested with OpenJDK 7.
No regressions found, while running the testsuite with embedded-test.
|
|
Remove leftover code.
|
|
Changes from:
https://github.com/foss-xtensa/uClibc/commits/xtensa_nptl
Author: Chris Zankel <chris@zankel.net>
Author: Baruch Siach <baruch@tkos.co.il>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Commit e3dec33ba (powerpc: Add TLS and NPTL support) introduced a duplicate of
_dl_add_to_slotinfo and _dl_initial_error_catch_tsd declarations.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
CC ldso/ldso/ldso.oS
In file included from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:35:1: warning: "S_ISUID" redefined
In file included from ./include/bits/kernel_stat.h:10,
from ./ldso/include/dl-syscall.h:31,
from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./include/sys/stat.h:163:1: warning: this is the location of the
previous definition
In file included from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./ldso/include/dl-syscall.h:36:1: warning: "S_ISGID" redefined
In file included from ./include/bits/kernel_stat.h:10,
from ./ldso/include/dl-syscall.h:31,
from ./ldso/include/ldso.h:47,
from ldso/ldso/ldso.c:33:
./include/sys/stat.h:164:1: warning: this is the location of the
previous definition
-----------------------------------------------------------------
Cleanly seperated the legacy ABI vs. new ABI scenario.
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Cc: 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>
|
|
This drops __signed, __volatile, and __const. Only the latter was
used in the code base, and for uClibc, not consistently. Much of
the code used plain "const" which meant "__const" was useless.
Really, the point of this is to stay in sync with what glibc did.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Building with NPTL enabled and shared library support disabled we hit:
In file included from libpthread/nptl/sysdeps/generic/dl-tls.c:30:0:
./ldso/include/dl-elf.h: In function '__dl_parse_dynamic_info':
./ldso/include/dl-elf.h:173:20: error: 'RTLD_NODELETE' undeclared (first use in this function)
./ldso/include/dl-elf.h:173:20: note: each undeclared identifier is reported only once for each function it appears in
make: *** [libpthread/nptl/sysdeps/generic/dl-tls.os] Error 1
A previous commit (f26c5f6952ce9bf8edec9c1571c47addb1bcc442) touched
on a similar issue, but added the include to the incorrect location.
Reported-by: Christophe Lyon <christophe.lyon@st.com> [arm nommu]
Reported-by: Daniel Beecham <daniel@lunix.se> [static x86_64]
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Add support for %p to _dl_dprintf for later corrections in debug messages.
Disable _dl_debug_file if LD debugging is not enabled and change it's use to 2.
The use of dprintf in elfinterp.c will spit out warnings, will be fixed in the
reworked ldso.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Include stddef.h instead of defining NULL
Adapt guard to file name.
Reorder includes a bit.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
dl-sysdep.h has to come before the fallbacks in dl-defs.h,
else the wrong macros are used.
While there adapt the guard to the file name.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
While there change the guard of the file
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The guard is changed to allow to be used the file in libc as well.
Include string.h (although already included by ldso.h).
Guard the rest of the file according to config options.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
powerpc guard depends on the compiler options, __powerpc__ should
work all the time.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
This can't happen, __mips__ was already checked earlier
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Use the one from libc.
While there, remove unused _dl_strncmp() and superfluos static forward declarations.
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
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>
|
|
The fdpic support has been broken since the prelink support was added,
because it didn't take into account DL_LOADADDR_TYPE could be a different
type of ElfW(Addr).
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The setup logic is duplicated, so unify it in a local func.
Mark the variable const while we're doing this, and add missing
ifdef protection to the header that declares it availability.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
The former is part of a standard (C99) while the latter is not.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
So application query if specified module is loaded or not with
dlopen.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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>
|
|
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>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.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>
|
|
Fix dladdr to correctly handle local function's address so backtrace_symbols
print only the function address for these function, instead of showing the name
of nearest one.
Indeed the dladdr walk through the hash table to find the nearest symbol, that
doesn't contain local symbols.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
* origin/master: (32 commits)
libubacktrace: fix backtrace support on arm-eabi, which needs libgcc_eh linked too
getaddrinfo.c: fix incorrect check for ERANGE from gethostbyaddr_r
getaddrinfo.c: improve code readability. No functional changes
string: remove unused variable
x86_64: silence warning if !TLS
buildsys: prettify ssp.c handling
madvise is LINUX_SPECIFIC
test_nptl: fix expected result for tst-cputimer[123]
test_nptl: fix expected result for tst-clock2 test
buildsys: make $(LOCAL_INSTALL_PATH) phony
ether_aton: reject invalid input
tests: disable ether tests if !HAS_SOCKET
inet: add ether_aton testcase
sysconf: clock_getres depends on HAS_REALTIME
__rt_sigwaitinfo: depends on HAS_REALTIME
buildsys: minor fixes in Makefile.arch for C6X
buildsys: minor fixes in Makefile.arch for microblaze
libubacktrace: enabled for all archs indeed.
sparc: don't access fp registers when configured for no fpu
libubacktrace: generic implementation based dwarf
...
Conflicts:
ldso/ldso/dl-elf.c
ldso/ldso/mips/elfinterp.c
ldso/ldso/x86_64/elfinterp.c
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
We have a problem with DT_TEXTREL shared libraries on nommu machines.
The dynamic linker's strategy is to map the text segment read-only
first, then look for DT_TEXTREL, and use mprotect to change protections
if necessary. This fails on nommu, since a nommu kernel can decide to
share the memory for private read-only file mappings, and mprotect
doesn't (can't) do anything about this sharing. Existing nommu targets
apparently have no need for this, but on C6X, we may need to assign
library indices at run-time if no --dsbt-index option was passed to the
linker at build time.
Hence, the following patch, which instead of using mprotect, redoes the
mapping with PF_W set.
Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
|
|
* origin/master: (137 commits)
utils/ldd: Check for returned pointer from strrchr not the value it holds
cris: add provide arch-specific vfork implementation
lutimes.c, stubs.c: fix compiling lutimes, if __NR_utimensat is not defined
bump version to 0.9.32-rc3-git
release 0.9.32-rc3
memalign: include sys/param.h for MAX
arm/bits/atomic.h: Include common/bit/atomic.h for thumb1
wctype.h: fix libc_hidden_proto for iswupper and add it for iswspace
add libc_hidden_proto for wcs[n]casecmp_l
really fix missing __libc_drand48_data
Revert "missing prototype of __libc_drand48_data fixed"
missing prototype of __libc_drand48_data fixed
time.c, time.h: remove unused hidden strftime/strptime
nanosleep.c: remove duplicated libc_hidden_proto
ctype.c, ctype.h: remove commented parts that were banned for removal after 0.9.31
_wctype.c, wctype.h: remove unused isw* and wctype_l hidden functions
time.c, wchar.h: remove unused hidden wcsftime
str[n]casecmp.c: fix hidden usage
remove unused hidden functions
frv/memset.S: add missing libc_hidden_def
...
Conflicts:
ldso/ldso/ldso.c
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
|