Commit Graph

23 Commits

Author SHA1 Message Date
mrg 88bb1d9b3b include <string.h> or <stdlib.h> for all prototypes 2003-07-26 15:04:38 +00:00
skrll 5f573ab68d ANSIfy and de-__P(). 2003-07-24 10:12:25 +00:00
skrll ddc9322f3b Support immediate binding on arm. 2003-07-21 15:34:35 +00:00
mycroft 4172074119 Skip the lazy PLT relocation if relocbase==0 (useful if libraries are loaded
at their VMA address).
2002-10-03 20:39:22 +00:00
mycroft 1c495430dd Remove the `self' args to _rtld_relocate_objects() and
_rtld_relocate_nonplt_objects().
2002-09-26 20:42:10 +00:00
mycroft 729925dfb9 Push the _rtld_bind() interface into MD code -- it's just a trivial wrapper
anyway.
2002-09-25 07:27:49 +00:00
thorpej 7e6d181789 No PC24 relocs will ever be unaligned. Pointed out by mycroft. 2002-09-15 01:08:04 +00:00
thorpej 672853f217 It is possible for reloc entries to point to unaligned locations; handle
this.
2002-09-15 00:52:08 +00:00
mycroft c74fdd7069 Use the addend on GLOB_DAT relocs (same as ABS32). 2002-09-13 05:45:46 +00:00
mycroft a3b892d178 Nuke -DRTLD_RELOCATE_SELF and `dodebug' from orbit. 2002-09-12 22:56:28 +00:00
mycroft 547bc13b97 _rtld_bind_start() is not used in MI code, so declare it in the MD code. 2002-09-12 20:20:58 +00:00
mycroft 1da1ca49f2 Do the _rtld_relocate_nonplt_self() thing here, and nuke the ld script. 2002-09-11 22:28:32 +00:00
junyoung b240241362 Add $NetBSD$. 2002-09-11 14:19:30 +00:00
mycroft 9f0e145106 Nuke RTLD_RELOCATE_SELF on ARM. 2002-09-09 19:28:36 +00:00
mycroft 6f0fac5efa Pass down an additional flag to _rtld_relocate_nonplt_objects() which
indicates whether we're relocating ld.elf_so itself.  Use this in some places
rather than hackish tests on `dodebug'.  (The Alpha and HPPA `dodebug' tests
were actually noops, because RTLD_RELOCATE_SELF is not set, and therefore
dodebug is always true.)
2002-09-06 15:17:53 +00:00
mycroft 0df8d18100 Introduce a new flag, `isdynamic', which is used to remember whether the
executable was of type ET_DYN.  Use this instead of `mainprog' to determine
whether we need to do base-relative fixups of the PLT.  (This allows loading
non-relocatable objects, should we desire to do that at some point...)
2002-09-06 13:20:29 +00:00
mycroft b97e4047b7 Re-poison a lot of consts, now that the mark shite is gone. 2002-09-06 03:12:04 +00:00
mycroft a04012e731 Split _rtld_relocate_plt_object() into two MD functions:
* _rtld_relocate_plt_lazy() fixes up all the relocs pointing to the PLT.  (On
  most platforms it just does a simple base-relative fixup; on SPARC it does
  nothing.)
* _rtld_relocate_plt_object() does immediate binding for a PLT entry.
The basic gist is that this saves a bit of time on SPARC (where the iteration
through the pltrela table was gratuitous), and a little less time on all other
platforms.  A whole lot of #ifdef'ed crap is moved out of reloc.c, too.

NOT tested on: hppa sh x86_64
2002-09-06 03:05:35 +00:00
mycroft ac191986f3 Partially fix up some debug printf()s that don't need to use defobj. 2002-09-05 21:31:30 +00:00
mycroft bdc2ac1520 A few things:
* Pass a symbol number to _rtld_find_symdef(), not a r_info.
* Don't try to do a symbol lookup when we find an unsupported relocation;
  instead get the symbol name from the referencing object's strtab.
* Add preliminary support for `-z combreloc'-style startup optimization on
  i386, `#ifdef COMBRELOC'.
2002-09-05 21:21:06 +00:00
mycroft 74444a2ddb Rename _rtld_relocate_nonplt_object() to _rtld_relocate_nonplt_objects(),
and push the outer loop into it.  This actually shaves a couple % off startup
time at least on PCs.
2002-09-05 20:08:14 +00:00
mycroft 00c3ad1f56 Split _rtld_relocate_nonplt_object() into separate MD files. 2002-09-05 18:25:45 +00:00
mycroft 2635aa544a Make _rtld_setup_pltgot() a consistent interface on all platforms. 2002-09-05 15:38:22 +00:00