summaryrefslogtreecommitdiff
path: root/ldso/ldso/arm
AgeCommit message (Collapse)Author
2015-04-24merge uClibc changesWaldemar Brodkorb
2015-04-22arm: Add BX and BXC macrosBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2015-01-01explicitly cast (even though this casting is not very nice)Thorsten Glaser
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2015-01-01make __dl_start, whose address is taken, into a real object typeThorsten Glaser
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
2014-06-12arm: move check for BX to its own headerYann E. MORIN
As Will noticed, the header this check is currently done in is asm-only, and is not meant to be included from C code. This breaks compilation when compiled for a Thumb2-aware CPU. Move the BX check to its own header, and revert 7a246fd. Reported-by: Will Newton <will.newton@gmail.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Will Newton <will.newton@gmail.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2014-01-15ldso: arm, metag: Use runtime pagesizeBernhard Reutner-Fischer
Use the generic runtime pagesize as per ce54b92b046b65464e2d16b3842f3e97e3e0f27e Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-11-18Replace FSF snail mail address with URLsMike Frysinger
This matches a similar change made to glibc. No functional changes here. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-15ldso: use _dl_strdup and _dl_dprintf only in ld-uClibc.soPeter S. Mazinger
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>
2012-06-15ldso: use .arm mode for resolver unconditionallyBernhard Reutner-Fischer
as per comment in the file. Fixes runtime with __THUMB_INTERWORK__ enabled. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-03-29ldso: mark _start hiddenMike Frysinger
There's no need to export this symbol, so mark them all hidden. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-25ldso: use ELF_xxx()/ElfW() helpersMike Frysinger
They expand into the same code, but using the ELF_xxx()/ElfW() macros makes it much easier to spot similarities between code bases. Acked-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Acked-by: Carmelo Amoroso <carmelo.amoroso@st.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-10-14ldso: silence harmless warning for !LDSO_PRELINK_SUPPORTBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-10-06ldso: merge duplicate dl-syscalls.h code to common headerMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-10-01ldso: constify reloc array itselfMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-07-01ldso: arm: fix build when prelinking is enabled.Carmelo Amoroso
This is a post merge fix to address build issue when PRELINK support is enabled. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-06-24Merge remote-tracking branch 'origin/master' into prelinkCarmelo Amoroso
* 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>
2011-06-11ARM: #include <bits/arm_asm.h> where __USE_BX__ is usedYann E. MORIN
The check for __USE_BX__ will be available in bits/arm_asm.h, so the latter must be included wherever the former is used. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> Cc: Khem Raj <raj.khem@gmail.com> Cc: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Cc: Carmelo AMOROSO <carmelo.amoroso@st.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
2011-01-21Merge remote branch 'origin/master' into prelinkCarmelo Amoroso
* origin/master: bump version to 0.9.32-rc2-git release 0.9.32-rc2 nptl: Fix __USER_LABEL_PREFIX__ concatenatio nptl: fix start_thread() for _STACK_GROWS_UP ldso: get rid of _dl_lookup_hash Add protected symbols support for all architectures Revert "ldso/arm: Correct protected symbol resolution" Revert "ldso_sh: add support for protected symbols to SH" Revert "ldso/i386: support protected symbols" cris: Fix build issues syslog: fix 'everyone logs with user facility' __psfs_parse_spec: always use long int for %p buildsys: headers target should not depend on sysnum.h buildsys: fix make release target nptl: get rid of the last preprocessor warning when __ASSUME_TGKILL is not defined remove uClibc_ctype.h if !LOCALE Revert "Makefile.in: Add header to 'all' target" nptl: get rid of preprocessor warning when __ASSUME_TGKILL is not defined Conflicts: ldso/include/dl-hash.h ldso/ldso/arm/elfinterp.c ldso/ldso/avr32/elfinterp.c ldso/ldso/bfin/elfinterp.c ldso/ldso/cris/elfinterp.c ldso/ldso/dl-hash.c ldso/ldso/i386/elfinterp.c ldso/ldso/m68k/elfinterp.c ldso/ldso/mips/elfinterp.c ldso/ldso/powerpc/elfinterp.c ldso/ldso/sh/elfinterp.c ldso/ldso/sh64/elfinterp.c ldso/ldso/sparc/elfinterp.c ldso/ldso/x86_64/elfinterp.c ldso/ldso/xtensa/elfinterp.c ldso/libdl/libdl.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-01-20Add protected symbols support for all architecturesSalvatore Cro
Protected symbols are global symbols for which interposition is not allowed. We manage them in generic _dl_lookup_hash function. To handle protected symbols we need to get a reference to the module that defines the symbol itself. So we pass a new parameter 'struct symbol_ref' to the __dl_lookup_hash that is defined as below: struct symbol_ref { const ElfW(Sym) *sym; struct elf_resolve *tpnt; }; The tpnt field is used as an ouput parameter and refers to the module which defines the protected symbol. Further it can be used as output parameter for TLS relocations and FDPIC case. The sym field is instead used as an input parameter to detect the visibility of the symbol we are looking-up. In this way we get rid of different signatures for _dl_lookup_hash, allowing to remove the _dl_find_hash wrapper. This new structure is also suitable for prelink integration. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2011-01-20Revert "ldso/arm: Correct protected symbol resolution"Carmelo Amoroso
This reverts commit 48fb264beaac8114e5ac3e80e70dda473fbce96d. The generic implementation will cover all the architectures handling the protected symbols in _dl_lookup_hash [ldso/ldso/dl-hash.c] Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-10-11ldso: Extend prelink support for all other achitecturesFilippo Arcidiacono
Update Arch specific part of the dynamic linker to the latest cahnges required by prelink: - Use _dl_loaded_modules->scope as global symbol scope - Pass the sym argument (or NULL) to the _dl_find_hash - Update _dl_parse, _dl_do_reloc, _dl_do_lazy_reloc and _dl_parse_relocation_information to reflect the change of the scope argument's type - Add the call to _dl_debug_lookup used for trace prelinking. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-07-21ldso/arm: Correct protected symbol resolutionKhem Raj
* Protected symbols should not be overridden with symbols from other modules. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2010-04-12Merge remote branch 'origin/master' into nptlAustin Foxley
Conflicts: libc/unistd/confstr.c Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2010-04-12silence warning about undefined preprocessor tokenBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-17Add missing libgcc_s.h header.Khem Raj
* Do not include tls.h in aeabi_read_tp.S. Its not needed. Signed-off-by: Khem Raj <raj.khem@gmail.com>
2009-10-15ldso: clean up breakage in tls mergeMike Frysinger
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>
2009-09-26ldso/: tls support for dynamic linkerAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
2009-07-05Move extern prototype out of function scopeRon
gcc-4.4 now barks about this, so appease it. Signed-off-by: Ron Lee <ron@debian.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-03-05Use __always_inline instead of __inline__Carmelo Amoroso
2009-01-28Remove check for the relocation type check in the resolver,Carmelo Amoroso
from all archs. Signed-off-by: Jiri Olsa <olsajiri@gmail.com>
2009-01-04ldso/ldso/dl-startup.c: make _dl_elf_main static; remove one dead variable.Denis Vlasenko
ldso/ldso/avr32/dl-startup.h: remove superfluous definition of START() macro. ldso/ldso/*/dl-startup.h: fix a typo in comment text data bss dec hex filename - 16752 244 92 17088 42c0 lib/ld-uClibc.so + 16709 240 92 17041 4291 lib/ld-uClibc.so
2008-12-03- Use runtime pagesize (Jeremy Kerr)Bernhard Reutner-Fischer
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>
2008-10-24- tidy up inline:Bernhard Reutner-Fischer
ldso and syscalls are __always_inline (the latter would need more cleanup)
2008-10-03- use c89-style commentsBernhard Reutner-Fischer
Closes issue #5194
2008-09-25- ARMV5 can use STRD and LDRD access instructions but these accesses need to beBernhard Reutner-Fischer
8 byte aligned. The dynamic linker's malloc needs to match this so structures become 8 byte aligned to void unaligned accesses. (71_all_uClibc-arm_fix_alignment.patch from gentoo)
2008-09-15- commentary typo fixBernhard Reutner-Fischer
2008-07-23- fix inline keywordBernhard Reutner-Fischer
2008-07-23- fix asm and volatile keywordsBernhard Reutner-Fischer
2008-04-24- fixup asm. No object-code changesBernhard Reutner-Fischer
2008-03-26Paul Brook writes:Bernhard Reutner-Fischer
The attached patch adds support for compiling arm uClibc as pure Thumb code. This is needed because some recent ARM codes do not implement traditional ARM mode. Specifically: * Cortex-M1 - An extremely minimal FPGA based core that only implements Thumb-1 (aka ARMv6-M). * Cortex-M3 - A Thumb-2 only ARMv7-M core. Most of uClibc already builds in Thumb mode, all that is left are a handful of assembly bits. Tested on arm-uclinuxeabi.
2006-11-21Use constant pool instead of and adr Khem Raj
instruction in unoptimized builds and thumb: thanks Paul Brook
2006-11-16Paul Brook writes:Eric Andersen
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.
2006-11-10This change reimplements the ARM _dl_linux_resolve entry point - this isEric Andersen
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).
2006-11-10arm thumb:Eric Andersen
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.
2006-10-10Make _dl_linux_resolve interworking safe. Thanks Paul BrookKhem Raj
2006-10-07Don't use r10 to find PIC base. In GCC 4.1.1 onwards ARM PIC handling uses ↵Khem Raj
pseudo register for PIC base so load and relocate it.
2006-06-19eat extraneous ; and insert some whitespace where it belongsMike Frysinger
2006-03-08macro out the /10 operation so arches can have their own versions ... and ↵Mike Frysinger
create some default macros for do_rem/do_div_10 so we dont duplicate the samething in many arch header files
2006-01-31s:THUMB_INTERWORK:USE_BX:, thx Khem RajPeter S. Mazinger
2006-01-31John Bowler says: use (!thumb) instead of (arm) since thumb defines armMike Frysinger