summaryrefslogtreecommitdiffstats
path: root/ldso/include/dl-hash.h
Commit message (Collapse)AuthorAgeFilesLines
* ldso: get rid of _dl_lookup_hashCarmelo Amoroso2011-01-201-7/+1
| | | | | | | | Now _dl_find_hash and _dl_lookup_hash are exactly the same, we can get rid of the _dl_lookup_hash, reverting the _dl_find_hash from a wrapper of _dl_lookup_hash to its original role. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* Add protected symbols support for all architecturesSalvatore Cro2011-01-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* ldso/include/dl-hash.h: suppress compiler warning. no code changesDenys Vlasenko2010-11-021-6/+6
| | | | | | | | | | The warning was repeated for every .c file which is including this header: ./ldso/include/dl-hash.h: In function '_dl_find_hash': ./ldso/include/dl-hash.h:150: warning: unused parameter 'tpntp' Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* check if USE_TLS is defined before useHans-Christian Egtvedt2009-12-171-2/+2
| | | | | | | | | | | This patch will convert all the #ifdef USE_TLS and #if USE_TLS to #if defined(USE_TLS) && USE_TLS. By checking if the USE_TLS is defined before checking its value will result in correct behavior for architectures not defining this config symbol. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
* ldso: simplify handling of extra _dl_lookup_hash() argMike Frysinger2009-10-151-14/+6
| | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ldso: clean up breakage in tls mergeMike Frysinger2009-10-151-7/+6
| | | | | | | | | | 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>
* whitespace cleanupBernhard Reutner-Fischer2009-10-061-4/+4
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* ldso/: tls support for dynamic linkerAustin Foxley2009-09-261-14/+47
| | | | Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
* Fix whitespace damage in file.Hans-Christian Egtvedt2008-11-031-1/+1
| | | | | Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
* - fix inline keywordBernhard Reutner-Fischer2008-07-231-1/+1
|
* Fix the recent dladdr changes so that they compile on FD-PIC targets.Bernd Schmidt2008-02-081-1/+1
|
* This patch solves a problem in dladdr caused by the wrong valueCarmelo Amoroso2008-01-181-0/+1
| | | | | | | of elf_resolve's loadaddr field for the main application. Signed-off-by: Filippo Arcidiacono <filippo.arcidiacono@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
* fix broken whitespace in many places; no functional changesMike Frysinger2008-01-091-6/+5
|
* Blackfin FD-PIC patch 4/6.Bernd Schmidt2007-12-031-0/+7
| | | | Add a hash table for function descriptors on FD-PIC targets.
* Blackfin FD-PIC patch 3/6.Bernd Schmidt2007-12-031-2/+16
| | | | | | | | | | | | | | | 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-0/+25
|
* merge some more FDPIC related fixes from Bernd SchmidtMike Frysinger2006-09-191-1/+1
|
* patch from Bernd Schmidt to abstract away load address typesMike Frysinger2006-07-051-2/+2
|
* use ElfW(Addr) in more placesMike Frysinger2006-07-051-11/+6
|
* revert fdpic patch so we can merge it in bit by bitMike Frysinger2006-07-051-2/+2
|
* Bernd Schmidt writes: abstract away addresses so we can support FDPIC ELFsMike Frysinger2006-06-301-2/+2
|
* 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
|
* Remove unused function.Joakim Tjernlund2005-09-181-1/+0
|
* Fix bug 430 and reduce ldso size with 1KB :). Not sure if I need to use ↵Joakim Tjernlund2005-09-171-0/+3
| | | | | | fstat64, but I am sure someone will tell me.
* some fixes by anemo in Bug 9 to play nicely with 32 or 64 bit hostsMike Frysinger2005-08-291-4/+4
|
* use Elf32_Word instead of uint32_t since that is what the ELF spec refers toMike Frysinger2005-07-131-4/+4
|
* force hash buckets to work off of 32bit quantitiesMike Frysinger2005-07-111-2/+2
|
* change all Elf32_* usage to ElfW(*) usage since we shouldnt care about the ↵Mike Frysinger2005-06-301-1/+1
| | | | bitsize
* Add missing definition for DL_OPENEDEric Andersen2005-04-131-4/+5
|
* Moved the addition of load address from the fast pathJoakim Tjernlund2005-03-291-1/+0
| | | | | where possible. This will also make ldso smaller. However the patch touches all archs and I have only tested PPC and x86.
* Add RTLD_LOCAL support for dlopened libs. Reported byJoakim Tjernlund2004-11-101-2/+2
| | | | | | | Andrew de Quincey, who has been most helpful getting this sorted out, thanks. Thanks also to Peter Mazinger who did alot of testing. Removed all traces of dl_parse_copy_information() since it is no longer used.
* - Remove dynamic_size from struct elf_resolve.Joakim Tjernlund2004-11-021-8/+3
| | | | | | | | | | - 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-5/+4
| | | | | | 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.
* Second attempt to fix the INIT/FINI order. This time I think I got it right :)Joakim Tjernlund2004-09-081-1/+8
| | | | This needs testing with apps that have complex dependencies.
* First attempt to fix the INIT/FINI ordering. Fingers crossed :)Joakim Tjernlund2004-09-031-0/+2
|
* Let ldso decide if it should relocate itselft a second time. ThisJoakim Tjernlund2004-08-171-1/+1
| | | | | | | is needed if ldso should use libcs malloc whenever possible. Fix RTLD_LAZY propagation to RTLD_NOW relocation when requested by libdl.
* Joakim Tjernlund writes:Eric Andersen2004-02-141-2/+1
| | | | | | | | | | | | | | | | | | 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 ...
* Fix function prototype to match the official ELF standard hash functionEric Andersen2004-02-101-1/+1
|
* Cool. Found most of the problem. Turns out we were inadvertanly loading someEric Andersen2003-08-191-23/+8
| | | | | | | libraries multiple times, wasting memory and causing different libraries to use different symbol sets, some of which were not properly resolved. Continue scrubbing ld.so and converting it to use proper types.
* Phase one of my evil plan to clean up ld.so...Eric Andersen2003-08-191-0/+118