matt
fd1caff7c2
Update to new reality. XXX _rtld_bind still needs to be written.
2003-10-06 16:08:35 +00:00
mycroft
65ed3bdcdd
Make the effect of the hack clearer.
2003-09-24 10:25:26 +00:00
mycroft
7242c1114c
One more tweak...
2003-09-24 10:18:52 +00:00
mycroft
7b234fd232
Make the comment a little more accurate.
2003-09-24 09:59:45 +00:00
mycroft
89ea37c60a
Temporary workaround for some binutils/ld lossage. See the comment for more
...
information.
2003-09-24 09:55:35 +00:00
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
skrll
619dee76f6
Correct the in_plt parameter of a couple of _rtld_find_symdef calls.
...
The mips_reloc.c case is a no-op as _rtld_symlook_obj ignores in_plt for
MIPS.
OK'ed by Charles.
2003-07-17 13:56:32 +00:00
marcus
fae2567c9b
Removed unused function.
2003-07-05 20:48:39 +00:00
tsutsui
0e65101f60
Add function prototype declarations.
2003-07-05 18:18:51 +00:00
marcus
a4878b4349
Bugfix: Don't pick addend both from reloc and contents at the same time.
2003-07-02 15:29:34 +00:00
marcus
6aeeb40d4a
Updated to work with current rtld code.
2003-06-30 00:50:46 +00:00
petrov
458dbd70ac
Fix alignment problem in debug output.
...
Happens only under RTLD_DEBUG_RELOC.
2003-05-23 20:13:50 +00:00
scw
0b8f02edad
Handle unaligned relocations, and RELATIVE relocs with non-zero addends.
...
This gets binaries linked against libstdc++ working (FSVO "working").
2003-04-21 11:54:46 +00:00
scw
e6b13790fa
SH5 needs __HAVE_FUNCTION_DESCRIPTORS defined in order for ld.elf_so
...
to resolve SHmedia function pointers correctly.
2003-03-26 14:46:32 +00:00
scw
d174ad2eab
Add support for shared libraries/dynamically linked binaries on sh5.
...
With the latest SuperH toolchain, NetBSD/evbsh5 can now
run with a fully dynamic userland (modulo a few remaining
gremlins affecting a couple of binaries).
2003-03-25 13:11:53 +00:00
mycroft
7cbba1750d
Shorten rtld_start() by 2 instructions or 8 bytes, and make it not use GOT
...
entries.
2003-03-02 22:56:14 +00:00
mycroft
d2fd5f837d
Shorten rtld_start() slightly -- there's a base-relative _DYNAMIC pointer at
...
the beginning of the GOT, so we don't need an extra one here. Also, remove a
bogus comment -- we do in fact have to do fixups, because there are pointers in
ld.elf_so's data segment that need to be relocated.
2003-03-02 22:03:40 +00:00
mycroft
33131cb294
Update copyright.
2003-03-01 15:14:59 +00:00
mycroft
9939b38056
Eliminate GOT usage in rtld_start() on this platform, too.
2003-02-28 22:37:35 +00:00
mycroft
9cb7d16b11
Similar to other rela platforms, do not use any GOT entries (other than the
...
first entry, which is a special case) in rtld_start, because they could be
all 0s. Instead we use the difference between the real _DYNAMIC address
(which we can determine on 68k with a "lea (%pc,_DYNAMIC),..." and the
base-relative one (at the beginning of the GOT) to figure out the relocation
offset.
Not needed for binutils-current, but I might as well fix it now.
2003-02-28 07:06:16 +00:00
mycroft
eea1001a73
Adjust for the fact that the GOT is all 0s in new binutils -- do the trick of
...
disassembling a call to _DYNAMIC to determine its real address, and using the
first entry of the GOT as its base-relative address.
It's evil, but it works.
2003-02-27 05:39:42 +00:00
mycroft
c42fd7b479
Revert previous change.
2003-02-21 01:12:56 +00:00
matt
0655a07988
Fix bug where only 2/3 of the PLT was being synched with the icache.
...
PLT entries are 12 bytes. Add a #define for that and replace the
explicit values with the PLT_ENTRY_SIZE. This bug can cause random
SIGILL signals to happen.
2003-01-11 01:33:56 +00:00
thorpej
044aeabaad
Bintuils-current initializes the GOT entries to 0 (instead of the
...
base-relative offsets that were placed there previously), so we
must use a different mechanism to compute our reloc base.
Patch from Charles Hannum.
2002-12-04 01:19:37 +00:00
fvdl
100e201ec6
Replace return -1 in rtld_bind with _rtld_die() call.
2002-11-24 18:19:23 +00:00
fvdl
d93db1cfce
Implement self-relocation as is required now.
2002-11-24 18:16:45 +00:00
matt
01ba93bc3c
Convert to register prefixes.
2002-10-31 20:23:25 +00:00
thorpej
b777dba640
_rtld_bind(): Don't use "rela" until after we've (potentially) adjusted
...
it.
2002-10-18 20:35:25 +00:00
mycroft
ad8ccd6290
Minor cleanup.
2002-10-05 11:59:03 +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
0a20e1e977
We don't need to save r7, either...
2002-09-27 03:46:12 +00:00
mycroft
b95736d94a
Put back the short-circuiting code -- Matt claims there are functions that rely
...
on it.
OTOH, don't bother saving r6 a second time.
2002-09-27 03:34:22 +00:00
mycroft
6d8d08304c
1) There is no reason to flush the I$ here, given that we do not modify any
...
instructions. Function calls use GOT indirection, and we only patch the
GOT.
2) The mask-comparison optimization always fails, because the saved mask
always has 0x2000 set, and the PLT stub mask never does. So, remove it.
2002-09-27 02:46:05 +00:00
mycroft
42fb5b53c2
Save one more instruction.
2002-09-27 02:14:38 +00:00
mycroft
06f9fa98b0
Save relocbase in %r10, not %r1.
...
Also, save one instruction.
2002-09-26 23:28:52 +00:00
mycroft
d437f6520b
Implement a self-relocate function for the VAX.
2002-09-26 22:26:26 +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
7d4bbc7f4e
Add an iffy heuristic that allows us to do lazy binding with new objects, but
...
detect old objects and deal with them.
2002-09-26 20:41:34 +00:00
mycroft
15025431b4
Update a comment.
2002-09-26 03:25:29 +00:00
mycroft
fd7e0d92f3
Add a rdbg() in _rtld_bind().
2002-09-26 02:52:05 +00:00
mycroft
723a5f8a50
Remove a meaningless bit from a rdbg().
2002-09-26 02:51:27 +00:00
mycroft
ee398b4d07
Remove vestigal comments about _rtld_bind_start_0() -- it works now.
2002-09-26 02:25:57 +00:00
mycroft
26043b23b0
Make room for the argument save area in _rtld_start(). The PLT stub already
...
made room from _rtld_bind_start(), but add a comment explaining the instruction
it uses.
2002-09-26 02:14:10 +00:00
mycroft
f1c792d648
Make the stack frame 96 bytes, like GCC does.
2002-09-26 02:05:41 +00:00
mycroft
bde7a965da
Tweak the save instruction in the PLT stub rather than adding an instruction
...
to the binder entry stub...
2002-09-26 01:59:16 +00:00
mycroft
d314d82b47
Allocate space for the argument space area in both _rtld_start() and
...
_rtld_bind_start(). Not needed normally, but if we compile ld.elf_so with
-g, it blows up without this.
2002-09-26 01:54:52 +00:00
mycroft
6bff9ffc3d
For consistency, use Elf_Word* to point to code, not Elf_Addr*.
2002-09-25 22:33:54 +00:00
mycroft
0079455251
Add a comment explaining some of the magick.
2002-09-25 22:29:12 +00:00