summaryrefslogtreecommitdiffstats
path: root/ldso/include
Commit message (Collapse)AuthorAgeFilesLines
...
* Second attempt to fix the INIT/FINI order. This time I think I got it right :)Joakim Tjernlund2004-09-082-3/+9
| | | | This needs testing with apps that have complex dependencies.
* First attempt to fix the INIT/FINI ordering. Fingers crossed :)Joakim Tjernlund2004-09-032-0/+9
|
* Remove unused variables. From Peter Mazinger.Joakim Tjernlund2004-09-021-2/+0
|
* 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.
* Remove poor man's malloc. Not needed anymore.Joakim Tjernlund2004-08-191-2/+1
|
* Move "debug_addr" ptr from dl-startup.c to ldso.cJoakim Tjernlund2004-08-191-1/+1
|
* Move the app specific stuff from dl-startup.c to ldso.c.Joakim Tjernlund2004-08-191-2/+1
|
* 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.
* Fixup PAGE_SIZE problemsEric Andersen2004-08-131-5/+1
| | | | -Erik
* Optimze _dl_memset() for PowerPC.Joakim Tjernlund2004-08-101-0/+28
| | | | | Other arches may also benefit from this iff it can do unaligned stores.
* Forgot _dl_memcpy in previous checkin.Joakim Tjernlund2004-08-101-5/+6
|
* _dl_strlen,_dl_strcat,_dl_strcpy,_dl_strcmp,_dl_strncmp,Joakim Tjernlund2004-08-101-36/+28
| | | | | | _dl_strchr,_dl_strrchr,_dl_strstr,_dl_memcmp: Optimize for archs which can do pre increment/decrement and load/store in one instruction.
* _dl_get_last_path_component:Joakim Tjernlund2004-08-101-31/+19
| | | | | | | | handle "" strings and optimze it. _dl_simple_ltoa,_dl_simple_ltoahex: Optimize for archs which can do pre increment/decrement and load/store in one instruction.
* Teach libdl to use normal libc symbols whenever possible, i.e. mallocEric Andersen2004-07-302-3/+6
| | | | | rather than _dl_malloc, fprintf rather than _dl_printf, etc. -Erik
* Revert this stuff for nowEric Andersen2004-07-161-1/+1
|
* Sigh. I got things working this morning, then checked stuff in from the wrongEric Andersen2004-07-141-1/+0
| | | | | tree. Bad boy, No doughnut. -Erik
* Based on a patch from Alexandre Oliva, make sure _dl_malloc returns a nicelyEric Andersen2004-07-141-0/+1
| | | | aligned pointer that may be aligned up to page_size. Also add _dl_free,
* Let dl-string.h include dl-sysdep.h, since it has proper include guardsEric Andersen2004-06-201-1/+1
|
* Bradley D. LaRonde writes:Eric Andersen2004-06-191-0/+2
| | | | | | | | | | | | dl-string.h references do_rem, but do_rem is a #define in <arch>/dl-sysdep.h which is not included by dl-sysdep.h. This causes a problem in libdl: In file included from ../../ldso/include/ldso.h:27, from libdl.c:33: ../../ldso/include/dl-string.h: In function `_dl_simple_ltoa': ../../ldso/include/dl-string.h:216: warning: implicit declaration of function `do_rem' Include dl-sysdep.h in dl-string.h before using do_rem.
* Jakub Bogusz from pld-linux dot org writes:Eric Andersen2004-06-122-8/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hello, I managed to get ldso (and thus shared linking to uClibc) to work on sparc (actually sparc64 kernel with 32-bit userspace), at least on simple "hello world" program (more complex ones not tested). Some notes on attached patch (against 0.9.26, would require some work to apply on current CVS - but I tested 0.9.26, not CVS): - ELF magic cannot be examined by _dl_strncmp so early, probably because of string constant, like on ppc/mips/sh (note that early SEND_STDERR still crashes when trying to do _dl_strlen - I suppose that string constants require relocation; but adding load_addr didn't help, just ELF header was displayed instead of crash) - mmap() is syscall6 like on ppc/mips/sh, not old i386 mmap() - for generic sparc (i.e. not sparcv8/sparcv9) gcc produces .udiv/.urem calls for unsigned integer / and % operators - so these operations must be avoided. I copied do_rem definition from arm header. But / and % are used also in _dl_simple_ltoa() and _dl_simple_ltoahex(); in ltoahex gcc optimizes it to shifts (but I think it's safer to use shifts explicitly, not rely on optimization...). I changed % in ltoa to do_rem, but as there was no do_div definition, I changed all "%d" specifiers to "%x" to avoid crashes (this changes wouldn't be needed if _dl_simple_ltoa() were fixed to not use division on sparc). - "#define SOLARIS_COMPATIBLE" in ld_sysdep.h broke ldso on Linux because of redefining _dl_linux_resolve only in some places (it was still referenced in INIT_GOT before redefinition). So _dl_linux_resolve redefinition should be moved before INIT_GOT definition or removed. - sparc64 kernel requires mmap() addresses to be aligned to 8192, not 4096, otherwise mmap() call failed - reloc_entry must be shifted by 10, not 12 (I found similar operation in glibc sources) Aside of sparc-specific fixes: - I moved some _dl_dprintf()s inside if(_dl_debug_*) conditions (to avoid debugging messages when LD_DEBUG is not defined) - it seems that there was possible off-by-one in ltoa and ltoahex? they are called with char[22] as 1st argument, and then '\0' is stored in local[22] (_before_ p decrementation)... or am I missing something? If not, fix is included in patch.
* make certain that getpagesize() returns correct the value for mipsEric Andersen2004-05-111-0/+1
| | | | by extracting the value from the ELF header.
* Based on a patch from Alexandre Oliva, allow uClibc to compileEric Andersen2004-03-191-1/+16
| | | | with __NR_mmap is not available (i.e. only __NR_mmap2)
* Sigh. I switched the values...Eric Andersen2004-02-201-2/+2
|
* Slightly cleaner formattingEric Andersen2004-02-201-4/+4
|
* Fixup support for gcc 2.95Eric Andersen2004-02-171-15/+15
|
* Provide the ldso syscalls and string funcs earlier in the listEric Andersen2004-02-171-3/+4
|
* Joakim Tjernlund writes:Eric Andersen2004-02-142-2/+14
| | | | | | | | | | | | | | | | | | 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
|
* Rework file naming, aiming for at least a vague level of consistancyEric Andersen2004-02-108-633/+6
|
* Fixup the definition of _dl_open, and move some bits back where they were,Eric Andersen2004-02-102-110/+98
| | | | till I properly finish the next step in my evil plan.
* Split off the stuff that cannot use function into its own file,Eric Andersen2004-02-072-38/+0
| | | | | to make it easier to treat it specially while not bothering the rest of the code with the same constraints.
* Step one, begin shuffling things around a bitEric Andersen2004-02-073-4/+56
|
* Trim trailing whitespaceEric Andersen2004-02-062-14/+14
|
* Modify interfaces for _dl_parse_relocation_information()Eric Andersen2004-01-292-10/+10
| | | | | | | _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-293-0/+33
|
* Eliminate separate passes for _dl_copy_fixups() and _dl_fixup(), andEric Andersen2004-01-292-2/+0
| | | | do both operations in a single pass.
* Some badly behaved arches fail to provide a PAGE_SIZE defineEric Andersen2004-01-061-0/+4
|
* Use PAGE_SIZE rather than hard coding 4096Eric Andersen2003-12-171-0/+2
|
* Rework the config system. Better utilize the Kconfig languageEric Andersen2003-11-042-6/+6
| | | | | which should simplify enabling arbitrary architectures. -Erik
* Always build and install ldconfigEric Andersen2003-10-122-2/+4
|
* Fix SUPPORT_LD_DEBUG_EARLY on powerpcEric Andersen2003-09-292-2/+2
|
* Weed out duplicates before trying to load libraries.... DelayedEric Andersen2003-08-312-0/+2
| | | | | checking for duplicates and returning an alias if an existing lib is already loaded is still correct for the dlopen case.
* Cool. Found most of the problem. Turns out we were inadvertanly loading someEric Andersen2003-08-192-46/+16
| | | | | | | 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-1911-0/+1331