summaryrefslogtreecommitdiffstats
path: root/ldso/include/dl-elf.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix nommu handling of DT_TEXTRELBernd Schmidt2011-04-111-1/+1
| | | | | | | | | | | | | | | | | 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>
* Add support for DSBT ELF to ld.soMark Salter2011-03-051-1/+10
| | | | | | | | | | This adds support for DSBT ELF to ld.so. This uses loadmaps like FD-PIC. Some code is added in ld.so to initialize the DSBT tables, and there's also a new target macro FINISH_BOOTSTRAP_RELOC. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: Aurelien Jacquiot <a-jacquiot@ti.com> Signed-off-by: Bernd Schmidt <bernds@codesourcery.com>
* ldso: fix fdpic buildsMike Frysinger2011-02-211-2/+7
| | | | | | | | | | | | Commit 33cb7f0b4 tried to add a small optimization for skipping unnecessary .dynamic adjustments, but did so by referencing an opaque type. While this works for non-fdpic targets (since the type can be cast to an integer), it falls apart for fdpic targets where the type is actually a structure. Since FDPIC can't support this optimization without walking a series of linked structures, just skip it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: Do not adjust dynamic section entries unnecessarilyFilippo Arcidiacono2010-09-151-7/+10
| | | | | Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* ldso: support RTLD_NODELETE and DF_1_NODELETETimo Teräs2010-04-221-7/+13
| | | | | | | | | Honor the nodelete flags so we don't delete shared library if it's sticky. This is useful for libpthread if it gets pulled in by a dlopen'ed library. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* - fix inline keywordBernhard Reutner-Fischer2008-07-231-2/+2
|
* fix broken whitespace in many places; no functional changesMike Frysinger2008-01-091-4/+4
|
* Blackfin FD-PIC patch 3/6.Bernd Schmidt2007-12-031-0/+5
| | | | | | | | | | | | | | | 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.
* Added support for GNU hash style into dynamic linkerCarmelo Amoroso2007-11-071-2/+19
|
* patch from Bernd Schmidt to abstract away initializing of relocation addressesMike Frysinger2006-07-051-1/+1
|
* patch from Bernd Schmidt to abstract away load address typesMike Frysinger2006-07-051-2/+4
|
* revert fdpic patch so we can merge it in bit by bitMike Frysinger2006-07-051-6/+3
|
* Bernd Schmidt writes: abstract away addresses so we can support FDPIC ELFsMike Frysinger2006-06-301-3/+6
|
* add a note as to why mips is specialMike Frysinger2006-04-201-0/+4
|
* change to Lesser GPL 2.1 as pointed out by psmMike Frysinger2005-11-231-1/+1
|
* add some copyright infoMike Frysinger2005-11-221-0/+7
|
* oops, fix typo in ELF_ST_BIND macrosMike Frysinger2005-07-131-2/+2
|
* clean up whitespaceMike Frysinger2005-07-071-11/+9
|
* make RUNPATH/RPATH support configurableMike Frysinger2005-07-071-0/+2
|
* setup ELF_R_TYPE() wrapper for ELF{32,64}_R_TYPE()Mike Frysinger2005-07-061-0/+2
|
* use new __always_inline defineMike Frysinger2005-07-021-1/+1
|
* create generic ELF_* macros to hide 32/64 bit differencesMike Frysinger2005-06-301-0/+20
|
* change all Elf32_* usage to ElfW(*) usage since we shouldnt care about the ↵Mike Frysinger2005-06-301-2/+2
| | | | bitsize
* Initial support for both RUNPATH support.Joakim Tjernlund2005-06-011-0/+4
| | | | | | RPATH sematics changed to match RUNPATH. Only difference is that RPATH is searched before LD_LIBRARY_PATH and RUNPATH after. This is not complete but better than the current mess(I think).
* Moved the addition of load address from the fast pathJoakim Tjernlund2005-03-291-3/+17
| | | | | where possible. This will also make ldso smaller. However the patch touches all archs and I have only tested PPC and x86.
* - Remove dynamic_size from struct elf_resolve.Joakim Tjernlund2004-11-021-1/+48
| | | | | | | | | | - Replace all open coded dynamic handling with a function. Reduces size. - Fold special MIPS dynamic code into the dynamic_info item. - Add RELRO support. - Support linking with "-z now". - prepare for DT_RELACOUNT/DT_RELCOUNT optimization. - Add -z now to ld.so linking, this is what ld.so does anyway so let the linker know that.
* Remove usage of _dl_parse_copy_information() from generic code.Joakim Tjernlund2004-10-071-2/+0
| | | | | | Remove definition of _dl_parse_copy_information() for powerpc. Remaining archs can do the same. Make debugging output of "relocation processing: xxx" a bit more sane.
* Puts common defines into dl-defs.h (in ldso/include) from dl-elf.h andJoakim Tjernlund2004-10-061-34/+1
| | | | | | dl-cache.h and make use of it. Also disables the lib-path-redundancy check for the case the cache is not used. Makes use of _PRELOAD_FILE_SUPPORT. From Peter Mazinger.
* This patch from Mike Frysinger, extended from an earlier patch from Peter S.Eric Andersen2004-10-031-10/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mazinger implements the changes suggested by me on the uclibc list. On Tuesday 28 September 2004 02:24 pm, Erik Andersen wrote: > What I think should be done is > > *) Someone that cares about USE_CACHE should fix that option > up to be sure it works, and give it a proper config entry > in extra/Configs/Config.in, and rename it to something > more appropriate such as LDSO_CACHE_SUPPORT. > > *) When LDSO_CACHE_SUPPORT=n, UCLIBC_RUNTIME_PREFIX /usr/X11R6/lib > should be included in the default library search path in > dl-elf.c, ldd, and ldconfig. > > *) When LDSO_CACHE_SUPPORT=y, UCLIBC_RUNTIME_PREFIX /usr/X11R6/lib > should be excluded from the default library search path in > dl-elf.c, ldd, and ldconfig, and those wishing to include > X11 stuff should add that into /etc/ld.so.conf and re-run > ldconfig. > > *) At present, LDSO_CONF and LDSO_CACHE use the same names > and same structure as glibc. This precludes > LDSO_CACHE_SUPPORT being uses in any sane fashion on a > dial glibc and uClibc system. Just as it was necessary > for use to use a different name for 'libuClibc' rather > than 'libc', and 'ld-uClibc.so.0' rather than > 'ld-linux.so.2' it seems that these configuration files > really ought to be given different names. >
* Patch from Stefan Allius:Joakim Tjernlund2004-08-251-3/+3
| | | | | Remove unused function parameter in ldso. Remove echo option '-e' since it is not supported on Solaris.
* Let dl-string.h include dl-sysdep.h, since it has proper include guardsEric Andersen2004-06-201-1/+1
|
* Sigh. I switched the values...Eric Andersen2004-02-201-2/+2
|
* Slightly cleaner formattingEric Andersen2004-02-201-4/+4
|
* Joakim Tjernlund writes:Eric Andersen2004-02-141-0/+13
| | | | | | | | | | | | | | | | | | Hi it is me again. This is the latest ldso patch. the NEW weak symbol handling works now with a little special handling in _dl_find_hash(). You get to chose if you want the new or old handling :) There was 2 missing _dl_check_if_named_library_is_loaded() calls in _dlopen(). I then disabled the _dl_check_if_named_library_is_loaded() in dl-elf.c since it is rendundant. Question, why does some _dl_linux_resolver(), like i386, have 2 calls to _dl_find_hash()? I think that is wrong, isn't it? I really hope you can check this out soon ...
* Rework file naming, aiming for at least a vague level of consistancyEric Andersen2004-02-101-1/+1
|
* Step one, begin shuffling things around a bitEric Andersen2004-02-071-2/+5
|
* Modify interfaces for _dl_parse_relocation_information()Eric Andersen2004-01-291-5/+5
| | | | | | | _dl_parse_lazy_relocation_information() and _dl_parse_copy_information() so they are all consistant, allowing for future consolidation. Trim some trailing whitespace as well.
* Scrub up use of ELF_USES_RELOCA and eliminte some unsightly ifdefsEric Andersen2004-01-291-0/+9
|
* Eliminate separate passes for _dl_copy_fixups() and _dl_fixup(), andEric Andersen2004-01-291-1/+0
| | | | do both operations in a single pass.
* Rework the config system. Better utilize the Kconfig languageEric Andersen2003-11-041-3/+3
| | | | | which should simplify enabling arbitrary architectures. -Erik
* Always build and install ldconfigEric Andersen2003-10-121-1/+2
|
* Weed out duplicates before trying to load libraries.... DelayedEric Andersen2003-08-311-0/+1
| | | | | checking for duplicates and returning an alias if an existing lib is already loaded is still correct for the dlopen case.
* Phase one of my evil plan to clean up ld.so...Eric Andersen2003-08-191-0/+91