Age | Commit message (Collapse) | Author |
|
Added support for the following tracing capabilities:
- LD_WARN to warn about undefined symbols during the lookup stage.
- LD_TRACE_PRELINKING to trace the needed libraries of the object
that we are prelinking.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Global symbol scope is implemented as a linked list of
local scope, that dynamically grows and shrinks when dlopen/
dlclose are called. Each local scope is implemented as an array
of pointer to struct elf_resolve.
This will help to detect conflict when LD_TRACE_PRELINKING option
will be implemented.
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
The dynamic linker can be run either indirectly through running some
dynamically linked program or library (in which case no command line options
to the dynamic linker can be passed and, in the ELF case, the dynamic linker
which is stored in the .interp section of the program is executed)
or directly by running:
/lib/ld-uClibc.so.* [OPTIONS] [PROGRAM [ARGUMENTS]]
Stand-alone execution is a prerequisite for adding prelink capabilities
to uClibc dynamic linker, as well useful for testing an updated version
of the dynamic linker without breaking the whole system.
Currently supported option:
--library-path PATH use given PATH instead of content of the environment
variable LD_LIBRARY_PATH
(Mandatory for prelinking)
Not supported options:
--list list all dependencies and how they are resolved
--verify verify that given object really is a dynamically linked
object we can handle
--inhibit-rpath LIST ignore RUNPATH and RPATH information in object names
in LIST
This feature can be enabled by setting LDSO_STANDALONE_SUPPORT=y
Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
this was causing tls symbols to leak into non-tls builds
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
|
|
The TLS merge 534661b91c9849 introduced multiple style problems as well as
random breakage:
- missing _dl_free
- incomplete parametrization of _dl_lookup_hash
- restore FDPIC handling in _dl_lookup_hash
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
|
|
If an arch (like alpha and others) have no ldso support at all, then there
is no point in attempting to walk loaded modules in the dl-* helper funcs.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
SIgned-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
text data bss dec hex filename
- 16709 240 92 17041 4291 lib/ld-uClibc.so
+ 16634 236 92 16962 4242 lib/ld-uClibc.so
- 4602 344 4 4950 1356 lib/libdl-0.9.30-svn.so
+ 4571 328 4 4903 1327 lib/libdl-0.9.30-svn.so
- 4602 344 4 4950 1356 lib/libdl.so
+ 4571 328 4 4903 1327 lib/libdl.so
|
|
Some powerpc machines can support 64k pages, enabled by the
CONFIG_64K_PAGES option in linux.
However, the uClibc dynamic loader won't currently work on these
machines, as it uses hard-coded values (PAGE_ALIGN, ADDR_ALIGN and
OFFS_ALIGN) in the ldso architecture-specific headers. When running on
a kernel with 64k pages, ld.so tries to mmap with 4k-aligned addresses,
rather than 64k, so mmap fails with -EINVAL.
When booting a 64k machine with a uClibc dynamic linker, init fails
with:
/init:500: can't map '/lib/libc.so.0'
/init:500: can't map '/lib/libc.so.0'
/init:500: can't map '/lib/libc.so.0'
/init: can't load library 'libc.so.0'
Kernel panic - not syncing: Attempted to kill init!
This change allows ld.so determine these alignment masks at runtime,
rather than compile-time. Since we have the _dl_pagesize variable
available, we can use that to generate the appropriate masks.
Since almost all of the architectures can use the common definitions for
the _ALIGN macros, we can consolidate them all in ldso.h, and override
in the sysdep headers where necessary (ie, mips).
This allows me to start a uClibc-based root fs on a 64k machine.
Signed-off-by: Jeremy Kerr <jk at ozlabs org>
|
|
|
|
|
|
exists, and move some definitions to their proper place.
|
|
A couple more target macros for ld.so to deal with FD-PIC support. We need
special code to compute the initial got and dpnt, and we need to pass extra
arguments to _dl_get_ready_to_run.
|
|
Add a new function _dl_free. In _dl_malloc, ensure we always get back a full
page from mmap.
Reset _dl_malloc_function and _dl_free_function when libdl is initialized.
|
|
Mazinger
|
|
|
|
be 0 in this case. Avoids some warnings).
|
|
|
|
|
|
|
|
|
|
need the defines from the former.
|
|
|
|
|
|
|
|
|
|
|
|
bitsize
|
|
|
|
|
|
This needs testing with apps that have complex dependencies.
|
|
|
|
|
|
|
|
|
|
|
|
-Erik
|
|
rather than _dl_malloc, fprintf rather than _dl_printf, etc.
-Erik
|
|
|
|
tree. Bad boy, No doughnut.
-Erik
|
|
aligned pointer that may be aligned up to page_size. Also add _dl_free,
|
|
by extracting the value from the ELF header.
|
|
|
|
|
|
|