nakayama
dbbd50a95f
Add missing comma.
2011-03-31 12:47:01 +00:00
martin
9f905ee41c
Add support for TLS relocations
2011-03-30 09:22:29 +00:00
joerg
cb1cd7e860
Add basic locking to ld.elf_so.
2011-03-25 18:07:04 +00:00
joerg
f40b256f09
Reduce header pollution for mdreloc.c. Make Obj_Entry argument of
...
_rtld_relocate_nonplt_objects non-const in preparation for TLS support.
2010-08-06 16:33:17 +00:00
christos
12bd4dbd45
PR/39240: Satoshi Suetake: Don't fail when attempting to resolve weak symbols
...
when we are doing immediate binding, leave them alone and they will be dealt
with later during lazy binding. From skrll@
2010-01-13 20:17:21 +00:00
mrg
750ad3d59d
simplify the logic for compat ld.elf_so and move it here. we now can
...
find the libc objdir for multiple compat ld.elf_so's, too.
2009-12-13 09:31:47 +00:00
mrg
f7f0bc40ae
rename LD32DIR to MLIBDIR.
2009-12-13 08:25:20 +00:00
lukem
b4fba76b41
Fix const issues (cast const pointers to "const uint8_t *" instead of "caddr_t")
...
NOTE: change based on ../i386/mdreloc.c 1.27
XXX: not compile tested
2009-03-16 02:46:47 +00:00
mrg
9108f12f6b
move the defines for RTLD_ARCH_SUBDIR into a sub-sub-makefile so we can
...
grab these values via reach-over more easily.
2009-01-06 02:15:06 +00:00
mrg
8679e33545
if LD32DIR is defined:
...
- look in src/compat/lib/libc for libc_pic.
- define RTLD_ARCH_SUBDIR to "i386" or "sparc" for amd64 and sparc64
builds, respectively
if RTLD_ARCH_SUBDIR is defined, add this path before
RTLD_DEFAULT_LIBRARY_PATH in the default search path.
2008-10-26 07:11:54 +00:00
matt
38bdc8954f
Refactor common code to _rtld_relocate_plt_object to i386 and arm so they
...
act like the other versions.
In _rtld_bind, if the result is 0, call _rtld_die.
Initialize _rtld_sym_zero.st_value to -_rtld_objself.maprelocbase. Now when
the symbol is resolved, st_value + maprelocbase will equal 0 and the above
check in _rtld_bind will fire and a call to NULL will be avoided.
2008-07-24 04:39:25 +00:00
martin
ce099b4099
Remove clause 3 and 4 from TNF licenses
2008-04-28 20:22:51 +00:00
mrg
82f7733046
in _rtld_bind() initialise result to appease GCC4.
2006-05-20 07:09:44 +00:00
perry
ae6ae2c362
Remove leading __ from __(const|inline|signed|volatile) -- it is obsolete.
2005-12-24 20:56:41 +00:00
skrll
680596d08e
Add __RCSID.
2005-08-20 19:01:16 +00:00
skrll
9f486044a0
KNF
2005-08-15 10:52:42 +00:00
lukem
3ed9ffcae1
Explicitly prefix ld(1) options in LDFLAGS with "-Wl," rather than
...
using the ${LDFLAGS:@F@-Wl,$F@} make substitution because that breaks
if LDFLAGS is already set.
2005-06-04 16:17:17 +00:00
martin
0a1196da3e
Add LD_BIND_NOW support for sparc and remove some relocation types that
...
are not supposed to happen in 32bit code.
From Nick Hudson.
2005-01-09 14:58:15 +00:00
martin
995d8a8e4b
Add support for unaligned relocs on sparc, from PR 26858.
...
Should also fix PR 25901 and PR 18296.
2005-01-05 09:18:53 +00:00
skrll
d93f13855a
Move common LDFLAGS into Makefile from arch/*/Makefile.inc
2004-02-21 15:56:03 +00:00
skrll
151426159b
Whitespace.
2004-02-20 20:58:24 +00:00
skrll
5f573ab68d
ANSIfy and de-__P().
2003-07-24 10:12:25 +00:00
mycroft
33131cb294
Update copyright.
2003-03-01 15:14:59 +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
1c495430dd
Remove the `self' args to _rtld_relocate_objects() and
...
_rtld_relocate_nonplt_objects().
2002-09-26 20:42:10 +00:00
mycroft
723a5f8a50
Remove a meaningless bit from a rdbg().
2002-09-26 02:51:27 +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
9e31b44846
There is no need to save and restore a second register window in the binder
...
stub.
2002-09-25 14:38:51 +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
mycroft
9d8c69b929
Remove vestiges of VARPSZ.
2002-09-24 12:12:07 +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
ebf50cdfbc
Update comments.
2002-09-12 17:18:37 +00:00
mycroft
5ee0e5e1c4
Pass the calculated relocation offset down to _rtld().
2002-09-12 17:07:25 +00:00
mycroft
e46eb805f1
This ld script is no longer necessary.
2002-09-11 19:46:04 +00:00
mycroft
aa1330ce71
Do the _rtld_relocate_nonplt_self() thing for SPARC.
2002-09-11 19:11:05 +00:00
mycroft
d22977bb61
Indent branch delay instructions.
2002-09-09 19:01:52 +00:00
mycroft
c127ff08fb
Nuke RTLD_RELOCATE_SELF for SPARC.
2002-09-09 18:10:20 +00:00
mycroft
492895a9f9
Expand the comment about the R_TYPE(RELATIVE) special-case, as it's not quite
...
obvious from the code. Also, just do it all the time, as an optimization.
2002-09-06 15:51:23 +00:00
mycroft
3eee01c5b9
Make the reloc tables const.
2002-09-06 15:32:56 +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
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
5f016a11ef
Repair a slight biff I made earlier -- do not exit the loop in
...
_rtld_relocate_nonplt_objects() early.
2002-09-06 02:01:39 +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