Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Jan 24, 2012
  1. @kraj

    ldso/mips: fix symbol lookup for JUMP_SLOT and COPY relocations

    Carmelo Amoroso authored kraj committed
    Fill properly the sym_ref fields when invoking _dl_find_hash to lookup
    symbols
    
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
  2. @kraj

    libdl: fix dlclose handling of symbol scope

    Carmelo Amoroso authored kraj committed
    Defer removal of the local scope of a dl-opened library after
    all the destructors (of itself and related dependencies) are actually
    get unloaded, otherwise any function registered via atexit()
    won't be resolved.
    
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
    Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
  3. @kraj

    mips/libdl: Apply relocations after appending the new scope

    kraj authored
    Without this the relocations for the current shared object
    are not resolved since the scope is not added to map yet
    
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
Commits on Jan 15, 2012
  1. @vapier

    buildsys: cache build flags in vars

    vapier authored
    Running `make clean` atm takes like 20 seconds because every subdir
    re-evaluates all the toolchain flags.  Add some helpers to automate
    the process of setting up variables to cache the result of tests,
    as well as the checking of an already set flag.
    
    Now `make clean` takes like 2 seconds on my system.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Commits on Jan 2, 2012
  1. @vapier

    ldso: setup search path even when there are no "/"

    vapier authored
    If people use an interp path such as "ld.so", then there is no "/" found,
    and we end up dereferencing a NULL pointer.  Simplify the logic by having
    a relative interp path like that be the same as "" (which the code later
    on interprets as $PWD).
    
    While we're here, document some of the nuances of this code.
    
    Reported-by: Ignacy Gawędzki <uclibc@qult.net>
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  2. @vapier

    ldso: simplify interp path search logic

    vapier authored
    The setup logic is duplicated, so unify it in a local func.
    
    Mark the variable const while we're doing this, and add missing
    ifdef protection to the header that declares it availability.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Commits on Dec 22, 2011
  1. @fabled @aldot

    libdl: rudimentary locking for dlopen/dlsym/dlclose

    fabled authored aldot committed
    This implements big-dlfcn lock to allow multithreaded usage of
    dlopen/dlsym/dlclose. We should really clean up the dl code so
    we can use more fine grained locking or even RCU where appropriate.
    But at least we won't crash now.
    
    Signed-off-by: Timo Teräs <timo.teras@iki.fi>
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Commits on Nov 27, 2011
  1. @vapier

    ldso: bfin: fix sram_flags init

    vapier authored
    An earlier version had this, but was lost as code was shuffled around.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  2. @vapier

    ldso: bfin: shrink sram mapping func

    vapier authored
    The L1 data and L2 code paths duplicate a lot, so unify them.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  3. @vapier

    ldso: fdpic: clean up style

    vapier authored
    There should (hopefully) be no functional changes here.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  4. @vapier

    ldso: fdpic: unify duplicate bfin/frv logic

    vapier authored
    Much of the logic in the bfin/frv subdirs is FDPIC specific and not arch
    specific.  So start a new fdpic/ subdir to keep common things.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  5. @vapier

    ldso: use __func__ rather than __FUNCTION__

    vapier authored
    The former is part of a standard (C99) while the latter is not.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Commits on Nov 23, 2011
  1. libdl: fix size parameter when unmap library in dlclose

    Filippo Arcidiacono authored Carmelo Amoroso committed
    Fix size parameter when unmap a library by means of dlclose, by
    taking into account the p_vaddr of first PT_LOAD segment, so it works
    also for prelinked shared objects.
    Unmapping of dlopen shared libraries is broken since
    94cc6ed
    
    Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com>
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Commits on Nov 7, 2011
  1. @aldot

    ldso: support RTLD_NOLOAD

    Timo Teräs authored aldot committed
    So application query if specified module is loaded or not with
    dlopen.
    
    Signed-off-by: Timo Teräs <timo.teras@iki.fi>
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Commits on Oct 25, 2011
  1. ldso: let people disable to lookup into LD_LIBRARY_PATH

    Carmelo Amoroso authored
    On hardened system it could be useful to disable the use
    of LD_LIBRARY_PATH.
    
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
  2. ldso: minor fixes to implicit search path

    Carmelo Amoroso authored
    Do not defined _dl_ldsopatch if implicit search path if not enabled,
    and avoid to call search_for_named_library (even if it is able to handle
    NULL search path).
    
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
  3. ldso: disable the implicit path search in stand-alone mode as well

    Carmelo Amoroso authored
    Honour LDSO_SEARCH_INTERP_PATH knob option also when running in
    stand-alone mode.
    
    Signed-off-by: Rune <u-uclibc-y2lt@aetey.se>
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Commits on Oct 19, 2011
  1. libdl: remove _dl_ldsopath from libdl.a

    Carmelo Amoroso authored
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Commits on Oct 14, 2011
  1. @aldot

    ldso: silence harmless warning for !LDSO_PRELINK_SUPPORT

    aldot authored
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Commits on Oct 6, 2011
  1. @vapier @aldot

    ldso: unify pread syscall definition

    vapier authored aldot committed
    A few arches want pread() defined, so move it to common code.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  2. @vapier @aldot

    ldso: bfin/frv: drop dead simulator code

    vapier authored aldot committed
    Nowhere do we define DYNAMIC_LOADER_IN_SIMULATOR, so drop the little bit
    of code that depends on it.  At least in the Blackfin case, we can run an
    FDPIC ldso just fine under the simulator without hacks.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  3. @vapier @aldot

    ldso: merge duplicate dl-syscalls.h code to common header

    vapier authored aldot committed
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
  4. @aldot

    microblaze mmu/elf/shared lib support

    Ryan Flux authored aldot committed
    microblaze can either be with mmu or without
    If with, use elf rather than flat, and support shared libs
    
    Signed-off-by: Ryan Flux <ryan.flux@emsolutions.com.au>
    Signed-off-by: Steve Bennett <steveb@workware.net.au>
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Commits on Oct 1, 2011
  1. @vapier

    ldso: x86_64: delete unused variable

    vapier authored
    gcc informed me:
    In file included from ldso/ldso/ldso.c:46:0:
    ldso/ldso/x86_64/elfinterp.c: In function '_dl_do_lazy_reloc':
    ldso/ldso/x86_64/elfinterp.c:294:6: warning:
    	variable 'symtab_index' set but not used [-Wunused-but-set-variable]
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
  2. @vapier

    ldso: constify reloc array itself

    vapier authored
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Commits on Aug 26, 2011
  1. ldso: fix build with PRELINK enabled and !TLS

    Carmelo Amoroso authored
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
  2. @aldot

    ldso: add missing include

    aldot authored
    Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Commits on Jul 27, 2011
  1. @cernekee

    ldso/mips: Clean up warnings

    cernekee authored Carmelo Amoroso committed
    Trivial fixes for these warnings:
    
      CC ldso/libdl/libdl.oS
    In file included from ldso/ldso/ldso.c:46:0:
    ldso/ldso/mips/elfinterp.c:88:1: warning: no previous prototype for '__dl_runtime_pltresolve'
    ldso/ldso/ldso.c: In function '_dl_get_ready_to_run':
    ldso/ldso/ldso.c:475:5: warning: assignment makes pointer from integer without a cast
    In file included from ldso/ldso/ldso.c:1097:0:
    ldso/ldso/dl-elf.c: In function '_dl_load_elf_shared_library':
    ldso/ldso/dl-elf.c:811:3: warning: assignment makes pointer from integer without a cast
    
    Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
  2. @cernekee

    ldso/mips: dlsym() incorrectly matches undefined symbols

    cernekee authored Carmelo Amoroso committed
    check_match() relies on checking for (sym->st_value == 0) to see if the
    symbol is undefined.  This works reasonably well on most architectures,
    such as ARM or i386:
    
    $ readelf -s /lib32/libcap.so.2 | grep -E "\<malloc\>"
        17: 00000000     0 FUNC    GLOBAL DEFAULT  UND malloc@GLIBC_2.0 (2)
    
    However, on MIPS, libbfd puts nonzero data in the st_value field to
    facilitate resetting the symbol's GOT entry if the library that defines
    the symbol gets unloaded:
    
    $ mipsel-linux-readelf -s libfoo.so | grep -E "\<malloc\>"
        74: 00003140     0 FUNC    GLOBAL DEFAULT  UND malloc
    
    This can cause check_match to report a false positive when examining the
    external symbol reference.  Consequently dlsym() will return a bad pointer
    to the caller.
    
    Use the special MIPS logic from glibc-ports-2.13 to avoid this situation.
    
    Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
  3. @cernekee

    ldso/mips: Enable bootstrap relocations

    cernekee authored Carmelo Amoroso committed
    _dl_reltypes_tab[] is an array of pointers to constant strings:
    
    Contents of section .data:
     20000 01000000 02000000 00000000 00000000  ................
     20010 70e50000 7ce50000 88e50000 94e50000  p...|...........
           ^^^^^^^^ ^^^^^^^^ ^^^^^^^^ ^^^^^^^^
    
    (pointers are LE)
    
    Contents of section .rodata:
     e570 525f4d49 50535f4e 4f4e4500 525f4d49  R_MIPS_NONE.R_MI
     e580 50535f31 36000000 525f4d49 50535f33  PS_16...R_MIPS_3
     e590 32000000 525f4d49 50535f52 454c3332  2...R_MIPS_REL32
    
    These pointers require relocation:
    
    DYNAMIC RELOCATION RECORDS
    OFFSET   TYPE              VALUE
    00000000 R_MIPS_NONE       *ABS*
    0001fffc R_MIPS_REL32      *ABS*
    00020010 R_MIPS_REL32      *ABS*
    00020014 R_MIPS_REL32      *ABS*
    00020018 R_MIPS_REL32      *ABS*
    
    On MIPS, only GOT relocations are currently handled by ldso during
    startup.  The net effect is that when running with "LD_DEBUG=reloc",
    ldso itself crashes before the program even starts.  This is caused
    by _dl_dprintf() dereferencing an unadjusted string pointer such as
    0xe570.
    
    This patch enables the missing relocations and allows LD_DEBUG to work
    as designed.
    
    Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Commits on Jul 25, 2011
  1. libdl: add option for controlling dl_cleanup

    Richard Braun authored Carmelo Amoroso committed
    When debugging memory leaks with Valgrind, it is required that
    dynamically loaded shared objects are not unloaded when a process exits,
    otherwise symbols from those files aren't correctly resolved in
    allocation traces. This patch adds the LDSO_NO_CLEANUP configuration
    option to control this behaviour.
    
    Signed-off-by: Richard Braun <rbraun@sceen.net>
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Commits on Jul 12, 2011
  1. @dougmencken

    ldso: fix build error due to missing variable 'st'

    dougmencken authored Carmelo Amoroso committed
    Fix a build error triggered when LDSO_PRELOAD_FILE_SUPPORT is enabled
    due to missing definition of 'st' variable.
    
    Signed-off-by: Douglas Mencken <dougmencken@gmail.com>
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Commits on Jul 7, 2011
  1. @kraj

    x86_64/elfinterp.c: Protect missed debug _dl_printf with __SUPPORT_LD…

    kraj authored
    …_DEBUG__
    
    Signed-off-by: Khem Raj <raj.khem@gmail.com>
Commits on Jul 1, 2011
  1. ldso: arm: fix build when prelinking is enabled.

    Carmelo Amoroso authored
    This is a post merge fix to address build issue when PRELINK
    support is enabled.
    
    Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
Commits on Jun 24, 2011
  1. Merge remote-tracking branch 'origin/master' into prelink

    Carmelo Amoroso authored
    * 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>
Something went wrong with that request. Please try again.