summaryrefslogtreecommitdiff
path: root/ldso/ldso/sh
AgeCommit message (Collapse)Author
2017-06-21remove the not useful disclaimerWaldemar Brodkorb
2017-01-14ldso: do not resolve relocations for debug, dig them up when debuggingWaldemar Brodkorb
Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
2015-03-24libm: honor NO_LONG_DOUBLE in ldouble_wrappersBernhard Reutner-Fischer
Fixes SH build breakage due to attempts to define hidden defs for unavailable long double functions. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2012-05-18ldso: sh: handle _dl_skip_args in linker startup instead of __uClibc_mainFilippo Arcidiacono
Handle _dl_skip_args in the asm part of the dynamic linker startup, to skip the ldso arguments, so we can keep this symbol hidden as other archs do. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.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>
2012-03-14ldso:sh: fix compiler warning due to unused-but-set-variableCarmelo Amoroso
gcc 4.6.x raises useful warnings due to unused-but-set-variable, This patch fixes the following one by using properly preprocessor guard In file included from ldso/libdl/libdl.c:129:0: ./ldso/ldso/sh/elfinterp.c: In function '_dl_do_reloc': ./ldso/ldso/sh/elfinterp.c:163:22: warning: variable 'tls_tpnt' set but not used [-Wunused-but-set-variable] Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
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-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_sh: add support for protected symbols to SH"Carmelo Amoroso
This reverts commit 74407db52d3953c7f3c6b8a53661cfc96cb07e22. 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-09-24Merge commit 'origin/master' into prelinkCarmelo Amoroso
Conflicts: ldso/ldso/sh/elfinterp.c Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-09-24ldso_sh: add support for protected symbols to SHSalvatore Cro
Protected symbols should not be overridden by symbols from other modules. Such symbols are exported i.e. globally visible, but references from whithin defining modules are satisfied locally. Signed-off-by: Salvatore Cro <salvatore.cro@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2010-09-17ldso: Add support for LD_WARN and LD_TRACE_PRELINKINGFilippo Arcidiacono
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>
2010-09-17ldso: Rework global scope handling and symbol lookup mechanismFilippo Arcidiacono
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>
2010-04-12silence warning about undefined preprocessor tokenBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-04-11ldso_sh: Provide only one definition for elf_machine_type_classCarmelo Amoroso
It doesn't need to provide different definition of elf_machine_type_class macro depending on TLS support. It also fixes build for sh architecture when thread support is off: CC ldso/ldso/ldso.oS In file included from ./ldso/ldso/sh/dl-sysdep.h:9, from ./ldso/include/dl-string.h:11, from ./ldso/include/ldso.h:40, from ldso/ldso/ldso.c:33: ./include/tls.h:6:22: error: tls.h: No such file or directory make: *** [ldso/ldso/ldso.oS] Error 1 Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2009-11-15ldso: Add missing newlines to some debug messagesBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@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-10-06trim whitespaceBernhard Reutner-Fischer
and wrap superlong line. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-09-26ldso/: tls support for dynamic linkerAustin Foxley
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
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-09-29sh_ldso: Fix typo: missing semi-colon.Carmelo Amoroso
2008-09-29Fix comment.Carmelo Amoroso
2008-09-29ldso: allow undefined references to weak symbolsCarmelo Amoroso
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-09-15- commentary typo fixBernhard Reutner-Fischer
2008-08-08Fix SH ldso sequence startup.Carmelo Amoroso
Pass via r4 the rtld finalizer _dl_fini to the user application. This will be the 6^ arg of __uClibc_main and will be registered with 'atexit'. In this way the dynamic linker will be able to call destructors defined within the loaded DSOs. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> Acked-by: Paul Mundt <lethal@linux-sh.org> Add missing 7th arg "stack_end". add comment of undocumented usage of r4. fix comment of expected __uClibc_main() prototype. Signed-off-by: Yoshii Takashi <yoshii.takashi@renesas.com> Acked-by: Paul Mundt <lethal@linux-sh.org>
2008-07-23- fix inline keywordBernhard Reutner-Fischer
2008-07-23- fix asm and volatile keywordsBernhard Reutner-Fischer
2008-01-12Make sh4 build works again adding a temporary work-aroundCarmelo Amoroso
iby redefining __always_inline to inline until gcc 4.x.x will get fixed. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-01-12Make sh4 build works again adding a temporary work-aroundCarmelo Amoroso
iby redefining __always_inline to inline until gcc 4.x.x will get fixed. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2007-03-13Carmelo Amoroso writes:Joakim Tjernlund
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).
2006-06-19eat extraneous ; and insert some whitespace where it belongsMike Frysinger
2006-01-30back to inline, mips failsPeter S. Mazinger
2006-01-24- use keywords __asm__ and __inline__ c99.Bernhard Reutner-Fischer
2006-01-19move a bunch of arch-specific checks out of common files and into an arch ↵Mike Frysinger
specific header file to make porting/updates a lot easier
2006-01-17since just about everyone uses return _dl_elf_main for START() now, make it ↵Mike Frysinger
the default
2005-11-21Partly undo earlier patch on vapier's requestPeter S. Mazinger
2005-11-21Guard debug_sym/debug_reloc, make sure elfinterp.c sees __SUPPORT_LD_DEBUG__Peter S. Mazinger
2005-09-21__set_errno must be redefined after #include "sys/syscall.h".Joakim Tjernlund
syscall.h should not have it's own version of __set_errno, instead syscall.h should include errno.h(see powerpc) since errno handling depends on threads/no threads. I leave the the fixing of syscall.h since there might be some smaller compile problems.
2005-08-15move arch-specific checks out of shared dl-syscall.h and into arch-specific ↵Mike Frysinger
dl-syscalls.h
2005-08-10use the inline version of _dl_parse_dynamic_infoMike Frysinger
2005-08-09clean up whitespace/syntaxMike Frysinger
2005-08-09eat whitespaceMike Frysinger