Age | Commit message (Collapse) | Author |
|
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>
|
|
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.
|
|
|
|
|
|
|
|
|
|
|