Age | Commit message (Collapse) | Author |
|
The following patches add support for the Xtensa processor architecture
to uClibc. They are based on a recent SVN checkout (12/05/2007).
The first patch (attached to this post) adds Xtensa support to various
shared configuration and make files. The following patches then include
the Xtensa specific files and directories.
I welcome any feedback and would appreciate it if you could include the
patches into the mainline tree. I am certainly committed to maintain the port.
Bob Wilson was kind enough to review the patches.
Some notes about the architecture: Xtensa is a configurable and
extensible processor architecture developed by Tensilica. For more
information, please visit: www.linux-xtensa.org.
|
|
|
|
These are mostly the changes necessary to deal with loading the libraries
into memory. A couple new target macros are defined for this purpose, and
the code in dl-elf.c is modified to deal with nommu systems.
|
|
|
|
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 hash table for function descriptors on FD-PIC targets.
|
|
Change _dl_find_hash to _dl_lookup_hash, as on the NPTL branch.
_dl_find_hash is now a wrapper function around it; unlike on the NPTL branch,
it retains the old interface so that not all callers need to be changed.
_dl_lookup_hash can optionally give its caller a pointer to the module where
the symbol was found.
Introduce ELF_RTYPE_CLASS_DLSYM for lookups from libdl.
Spelling fixes in the Blackfin port, since Alex Oliva's original version of
these patches used _dl_find_hash_mod as the name of the function rather than
_dl_lookup_hash.
|
|
Add the necessary changes in ld.so and libdl to deal with targets that
prepend an underscore to symbol names.
|
|
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.
|
|
system calls actually being inlined, so AVR32 needs to use
__always_inline instead of just inline. The attached patch changes this
for the system calls.
Signed-off-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
|
|
|
|
|
|
containing an object built without -fpic/-fPIC - then:
* If __FORCE_SHAREABLE_TEXT_SEGMENTS__, then it gives an error "Can't
modify %s's text section. Use GCC option -fPIC for shared objects,
please.\n" and exits.
* Otherwise, it makes the library's pages writable and relocates it.
If it encounters text relocations in a position-independent executable -
one containing an object built without -fpie/-fPIE/-fpic/-fPIC - then:
* If __FORCE_SHAREABLE_TEXT_SEGMENTS__, it does nothing about making the
pages writable, leading to a crash.
* Otherwise, the loop to make the pages writable uses the same variable
ppnt as used in an outer loop, messing up that outer loop and also causing
a crash.
This patch fixes both cases, by giving an error if
__FORCE_SHAREABLE_TEXT_SEGMENTS__ and saving and restoring ppnt otherwise.
Tested in both cases on ARM EABI.
Joseph S. Myers
joseph@codesourcery.com
|
|
<hcegtvedt@atmel.com>
|
|
Mazinger
|
|
|
|
will set the type of common symbols to STT_COMMON
instead of STT_OBJECTS, so the dynamic linker needs
to handle this type os symbols too.
Same changes have been added to glibc (See: bugzilla #5104).
This patch ensures the uclibc will work with later bintuils.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
- adjust setting flags accordingly to use (hardcoded, see below) -Wl,
Potential improvements:
*) --warn-unresolved-symbols should perhaps be used for all libs
*) eventually rename LDFLAGS to CC_LDFLAGS
*) probe for compiler driver's notion of flag to use for passing in
linker flags (i.e. don't hardcode "-Wl,")
|
|
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
the lookup over next DSO.
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
|
|
I got the library to compile with the attached patches, though dynamic
loader crashes early.
In buildroot I changed the architecture name by hand from sparc to
sparc64, otherwise the compiler produced 32-bit files with V9 (64-bit)
instructions. This configuration is not supported by QEMU, so I aimed
for pure 64-bit. I think Sparc64 option needs to be added to
buildroot.
The _Qp_ ops seem to be required by the ABI. This and setjmp patches
are just hacks to get the compilation further. The _Qp_ ops can be
found in glibc, would it be OK to use those?
V9 assembler requires declarations for global register use.
The mem* functions in sparc32 directory did not work. They are
actually used only by the hybrid 32-bit + V9 CPU configuration.
|
|
from i386 and x86_64.
|
|
Sparc32.
|
|
|
|
|
|
Currently a static libdl.a doesn't run all the constructors or
destructors of the libraries it loads. I can't see a good reason for
that, and it does cause aborts in the destructors it does run for things
like libgcc.so on the Blackfin.
Fixed with the patch below - untested in mainline, but the equivalent
has been in our Blackfin tree for a while now.
|
|
|
|
I experiencied some problems while trying to debug the ld.so (sh4)
in debug mode. I found that the _start code was not placed into any
PT_LOAD segment causing a SIGSEV.
I solved this issue explicitely placing the _start code into
the .text section (see attached patch).
|
|
Hi All,
the attached patch completes my previous patch on statically linked
application calling dlopen enabling the support for LD_DEBUG.
Further it fixes the missing initialization of the _dl_library_path
variable.
This patch has been fully tested with the uClibc-nptl branch (sh4).
|
|
|
|
From Atsushi Nemoto.
|
|
From Carmelo Amoroso.
|
|
|
|
be 0 in this case. Avoids some warnings).
|
|
does not generate relocs
|
|
_dl_debug_file for debug messages
|
|
http://uclibc.org/lists/uclibc/2007-January/017165.html
|
|
ELF symbol names are arbitrary 0-terminated sequences of bytes, and the
ELF hash function is defined in the ELF specification to use unsigned
char. Thus uClibc's _dl_elf_hash, using plain char, breaks when char is
signed and symbol names contain bytes with the high bit set, as with GCC's
ucnid-* tests. This patch fixes this problem.
|
|
config option --enable-secureplt. The assembler must also
supports R_PPC_REL16* relocations. gcc 4.1.1 and binutils 2.17
is known to do this.
|
|
minor include file issues
|
|
instruction in unoptimized builds and thumb: thanks Paul Brook
|
|
L1 functions
|
|
This reintroduces a mechanism identical to the DL_BOOT macro present in
older versions of uClibc. On Blackfin and FRV, we want to pass more
than one argument to _dl_start. We also want to do something special
before returning, so delete the warning when the START macro is defined.
|
|
|
|
The patch below fixes a bug in the new ARM _ld_linux_resolve implementation.
I'm don't know if/how the current implementation was tested, but it's
completely broken.
This patch makes the prologue and epilogue agree on how big the stack frame
is, and also makes sure EABI doubleword stack alignment is preserved.
Tested on arm-linux-gnueabi.
|
|
called to resolve DLL PLT entries. The assembler is changed to be thumb
compatible and slightly faster, the C function, _dl_linux_resolver (note
the extra r) is changed to take a byte address in place of an 8 byte
count (faster in caller and callee, and slightly easier to understand).
|
|
Put the call_via_rx code into each executable - call_via_ip cannot
possibly work if called through the PLT! ldso requires this code
too as it is not linked with the crt stuff and thumb ldso does
make calls via a register.
The patch puts the code into crti.S so that it is linked into
every normally built application (if thumb or interworking is
selected). This is only 30 extra bytes and it works - the previous
code did not because nothing both implemented and exported the
APIs (they were in libgcc, but not in the version script).
crti.S and crtn.S is also brought up to date with GCC 3.4.4 - this
is essential for thumb support because the .init and .fini sections
must use arm or thumb code to match the compilation of the libraries.
Note that code which pushes stuff into .init or .fini must be
compiled with or without -mthumb to match the uclibc compilation -
and gcc itself (which does do this) must therefore be compiled to
match.
|
|
64bit MIPS ELF format tweaks. (from glibc)
Elf32/ElfW convertions.
asm code adjustments.
|
|
|
|
|