summaryrefslogtreecommitdiff
path: root/ldso/ldso/dl-hash.c
AgeCommit message (Collapse)Author
2009-01-10simple optimizations and style fixes in dynamic loadingDenis Vlasenko
text data bss dec hex filename - 16709 240 92 17041 4291 lib/ld-uClibc.so + 16634 236 92 16962 4242 lib/ld-uClibc.so - 4602 344 4 4950 1356 lib/libdl-0.9.30-svn.so + 4571 328 4 4903 1327 lib/libdl-0.9.30-svn.so - 4602 344 4 4950 1356 lib/libdl.so + 4571 328 4 4903 1327 lib/libdl.so
2008-12-22- non-pic support for MIPS (Catherine Moore, clm at codesourcery com)Bernhard Reutner-Fischer
2008-11-18Move _dl_iterate_phdr into libc.so.0 and libc.a (as glibc does).Carmelo Amoroso
Currently we have an implementation in ld.so and libdl.a. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-07-23- fix inline keywordBernhard Reutner-Fischer
2008-03-11Move calculation of rem within if (unlikely statementCarmelo Amoroso
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> SIgned-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2008-03-09Khem Raj <kraj@mvista.com> writes:Carmelo Amoroso
While compiling trunk on ARM with GCC 4.2 and enabling LDSO_GNU_HASH_SUPPORT I stumbled upon this problem. GCC made a call to libgcc function __aeabi_uidivmod()->__div0()->__raise() and raise is not yet compiled in at the time of compiling ldso so I got well known undefined symbol __raise problem This patch uses the do_rem () macro to do the same operation.
2008-02-08Fix the recent dladdr changes so that they compile on FD-PIC targets.Bernd Schmidt
2008-01-18This patch solves a problem in dladdr caused by the wrong valueCarmelo Amoroso
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>
2008-01-09fix broken whitespace in many places; no functional changesMike Frysinger
2007-12-03Fix a few warnings introduced by my previous commits.Bernd Schmidt
2007-12-03Blackfin FD-PIC patch 3/6.Bernd Schmidt
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.
2007-11-07Added support for GNU hash style into dynamic linkerCarmelo Amoroso
2007-10-21Handle STT_COMMON symbols too. Following binutils releaseJoakim Tjernlund
will set the type of common symbols to STT_COMMON instead of STT_OBJECTS, so the dynamic linker needs to handle this type os symbols too. Same changes have been added to glibc (See: bugzilla #5104). This patch ensures the uclibc will work with later bintuils. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2007-10-08Do string comparisos as late as possible during symbol lookup.Mike Frysinger
Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2007-09-28Make sure that the DSO has an hash table into its elf, otherwise skipMike Frysinger
the lookup over next DSO. Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com>
2007-01-09Joseph S. Myers writes:Joakim Tjernlund
ELF symbol names are arbitrary 0-terminated sequences of bytes, and the ELF hash function is defined in the ELF specification to use unsigned char. Thus uClibc's _dl_elf_hash, using plain char, breaks when char is signed and symbol names contain bytes with the high bit set, as with GCC's ucnid-* tests. This patch fixes this problem.
2006-11-16revert rev 16527 changes to ldso/ldso/dl-hash.cEric Andersen
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-07-05patch from Bernd Schmidt to abstract away initializing of relocation addressesMike Frysinger
2006-07-05patch from Bernd Schmidt to abstract away load address typesMike Frysinger
2006-07-05use ElfW(Addr) in more placesMike Frysinger
2006-07-05revert fdpic patch so we can merge it in bit by bitMike Frysinger
2006-06-30Bernd Schmidt writes: abstract away addresses so we can support FDPIC ELFsMike Frysinger
2005-12-14fix signed/unsigned warnings and unused warningsMike Frysinger
2005-09-18Remove unused function.Joakim Tjernlund
2005-08-29some fixes by anemo in Bug 9 to play nicely with 32 or 64 bit hostsMike Frysinger
2005-07-13eat pointless whitespaceMike Frysinger
2005-07-13use Elf32_Word instead of uint32_t since that is what the ELF spec refers toMike Frysinger
2005-07-11force hash buckets to work off of 32bit quantitiesMike Frysinger
2005-06-30create generic ELF_* macros to hide 32/64 bit differencesMike Frysinger
2005-06-30change all Elf32_* usage to ElfW(*) usage since we shouldnt care about the ↵Mike Frysinger
bitsize
2005-06-30The function '_dl_memset' should always be inlined regardless of the"Steven J. Hill"
optimization level chosen. This allows uClibc to be compiled with the latest GCC-4.1.0. While tracking down the specific culprit causing the segmentation fault of the dynamic loader with GCC-4.1.0 I was able to force inlining of other functions such that I shaved 512 bytes off the size of the loader, yay. Also fixed warning in 'dl-hash.c'.
2005-04-01Optimize _dl_elf_hash(), both smaller and faster. MostlyJoakim Tjernlund
taken from glibc.
2005-03-29Moved the addition of load address from the fast pathJoakim Tjernlund
where possible. This will also make ldso smaller. However the patch touches all archs and I have only tested PPC and x86.
2005-01-05fix eriks e-mail addressMike Frysinger
2004-11-10Add RTLD_LOCAL support for dlopened libs. Reported byJoakim Tjernlund
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.
2004-11-02- Remove dynamic_size from struct elf_resolve.Joakim Tjernlund
- 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.
2004-08-26Added test for RTLD_GLOBAL flag in _dl_find_hash().Joakim Tjernlund
Fixed a bug in libdl.c where the RTLD_GLOBAL was assigned wronly.
2004-08-09This should fix the dlsym problem Peter van Hoyweghen reported.Joakim Tjernlund
However RTLD_LOCAL still doesn't work. Everything is RTLD_GLOBAL.
2004-07-14Sigh. I got things working this morning, then checked stuff in from the wrongEric Andersen
tree. Bad boy, No doughnut. -Erik
2004-07-14Based on a patch from Alexandre Oliva, make sure _dl_malloc returns a nicelyEric Andersen
aligned pointer that may be aligned up to page_size. Also add _dl_free,
2004-06-19Joakim Tjernlund writes:Eric Andersen
Make old weak symbol handling work, if someone wants to enable it.
2004-02-20Patch from Joakim Tjernlund:Eric Andersen
white space cleanup and optimize the inner loop in dl_find_hash.
2004-02-14Joakim Tjernlund writes:Eric Andersen
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 ...
2004-02-10Fix function prototype to match the official ELF standard hash functionEric Andersen
2004-02-08Cleanup whitespace and formattingEric Andersen
2004-02-07Joakim Tjernlund writes:Eric Andersen
Hi again All dltest* and test* programs pass for me. uClibc ld.so resolves according to the OLD weak symbol handling. I have tried to use the new scheme as well, but that segfaults in all cases but test3.
2003-08-19Cool. Found most of the problem. Turns out we were inadvertanly loading someEric Andersen
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.
2003-06-18Be extra careful to memset the correct size, not the size of some randomEric Andersen
pointer. Fix printing of '0x0x' in ldd output. Simplify discrimination of libname, so doing things like dlopen("./libfoo.so",RTLD_NOW) with a leading "./" in the path will work as expected. -Erik
2002-12-12Rework things such that staticly linked applications can useEric Andersen
dlopen and have it be successful. This required moving some things out of ldso.c into readelflib1.c, and directly including hash.c and readelflib1.c into dlib.c when building the static version of the library. -Erik