Commit Graph

229 Commits

Author SHA1 Message Date
thorpej
240ebfc364 * Move The Alpha R(RELATIVE) handling into an Alpha-specific code block,
thus isolating the "iffy hueristic" from the rest of the relocation code.
* In the "iffy hueristic", use _GOT_END_, not _DYNAMIC.
* Include the addend in Alpha R(RELATIVE) relocations.
2001-12-16 08:23:25 +00:00
thorpej
7dcc71da1d Don't put compiler options into CPPFLAGS. 2001-12-14 22:21:45 +00:00
thorpej
151a90b5ce ...and the other other missing notice. 2001-12-14 22:11:47 +00:00
thorpej
d63d6c6cea Add other missing copyright notice. 2001-12-14 22:07:23 +00:00
fvdl
02f3677f38 Add missing copyright notice. 2001-12-14 21:33:59 +00:00
thorpej
6d9f5579ab Garbage-collect the OLD_GOT stuff. 2001-12-14 21:25:22 +00:00
thorpej
c7e9af3ef0 binutils-current ld emits DT_TEXTREL into _DYNAMIC on arm-elf. Handle
this.
2001-12-14 21:21:27 +00:00
thorpej
6e94624a62 Add code to peek into the PLT and determine which PLT entry format
is being used.
2001-12-14 00:53:06 +00:00
thorpej
67925dcb0d Supply two lazy binding routines for Alpha: one that works with the
old PLT format, and one that works with the new.

XXX We currently always use _rtld_bind_start_old() in
_rtld_setup_alpha_pltgot().  We need to add code to peek
into one of the PLT entries to see which format it's in
and pick the correct binding routine.
2001-12-13 22:34:51 +00:00
rafal
b8f0be7074 Check in workaround for BFD ABI change on MIPS: the new MIPS BFD generates
relocs for local symbols as section-relative REL32 relocs with values based
at 0, whereas previously BFD generated those relocs with values based at the
start address of the section.

This code adjusts all STT_SECTION REL32 relocs which have values less than
the start of the section by adding in the base address of the section.  This
may limit section sizes to 2GB, but that shouldn't be a problem for now.

XXX: Needs to be followed-up with binutils list to get closure on which
interpretation is correct (the new ABI or the old one), I just haven't
yet had the time to chase that.
2001-12-13 21:41:58 +00:00
thorpej
cbadc6e3d3 Use numeric labels. 2001-12-13 21:34:04 +00:00
thorpej
23abd45cd4 Add RCS ID. 2001-12-13 20:31:31 +00:00
thorpej
bbb7ad0534 * Add a linker script which provides a _GOT_END_ symbol that we can
use to find the end of the GOT, rather than relying on _DYNAMIC
  to immediately follow the GOT.  (A change in current binutils
  moved _DYNAMIC, and thus would have broken our Alpha ld.elf_so).
* Add #ifdef'd out code to deal with the new PLT format.
2001-12-13 20:30:48 +00:00
rafal
24ed46ea21 Fix bug found by Izumi Tsutsui -- if _rtld_find_symdef returned NULL, the
runtime linker would crash.  Restore behavior similar to version 1.3, where
the runtime linker continues on, ignoring the symbol.
2001-11-24 18:07:04 +00:00
skrll
aabfabf3e7 Allow both space and colon as a separator in LD_PRELOAD. Document this and
the fact that space may be retired in the future.

Closes misc/11961

Reviewed by christos
2001-11-02 15:28:36 +00:00
wiz
27bebba05c Sort SEE ALSO, drop some unnecessary .Pp's, whitespace and misc fixes. 2001-11-01 01:10:59 +00:00
skrll
0a9eeb6303 Add a man page for ld.elf_so. 2001-10-31 18:26:23 +00:00
rafal
2576af45bb Fix how underfined weak symbols are treated -- before, ld.so would do nothing
with them, rather than defaulting them to zero.  This caused breakage with
the drawf EH stuff and init/fini code when they weren't used by the caller
(and hence the appropriate handlers were left undefined).  Also fix an un-
initialized variable in symbol.c that only MIPS MD code tripped over.
2001-10-14 23:13:21 +00:00
mycroft
cf4aca11b5 In the `I can't believe it's been broken all this time' department:
_rtld_bind_start must save and restore the condition codes.  Varargs functions
(like, say, printf()) depend on the state of cr1 to determine whether they need
to store floating point registers in the save area.  Without this, the first
call to any particular varargs function will fail if floating point values were
passed.
2001-09-26 04:06:43 +00:00
mycroft
7ff3aa31e8 Reorganize PowerPC cold a little. The return value from _rtld_bind_pltgot()
was ambiguous in the case of a weak symbol that was not defined.  This caused
RTLD_NOW to fail badly with shared libraries linked against the new crtbegin.o.
2001-09-10 06:09:41 +00:00
eeh
192ea0d41e Correct some comments. 2001-08-14 22:17:48 +00:00
eeh
c9550f39ed Workaround for binutils 2.11 behavior. 2001-08-14 20:17:25 +00:00
eeh
2e3cc27a62 Get rid of some debug code that should no longer be needed. 2001-08-14 20:16:38 +00:00
eeh
f4edff94e1 Pointers are NULL. Characters are '\0'. 2001-08-14 20:13:56 +00:00
matt
ee534ba09d Fix ABS32 ARM reloc case. ELF shared libs on ARM now work! 2001-07-16 05:40:53 +00:00
matt
85d99cf46c Fix binder routine to not use a volatile register. 2001-07-15 23:19:59 +00:00
matt
2285430c7e Bugfix for _rtld_start. Enable common plt processing code for arm 2001-07-15 17:31:02 +00:00
matt
1c2ce68f11 Enable arm if OBJECT_FMT is ELF. Initialize first few GOT entries for ARM. 2001-07-15 03:09:22 +00:00
matt
a61a40997d Initial support for dynamic ELF support on ARM. 2001-07-15 03:08:33 +00:00
matt
00f7d1ea67 Add support for ARM ELF dynamic relocs. 2001-07-15 01:44:10 +00:00
fvdl
b13cc91d31 Get stack layout right. 2001-06-20 17:58:16 +00:00
fvdl
e55b167011 Remove mistaken casts of PLT relocations to 32 bit values. 2001-06-20 17:58:05 +00:00
fvdl
315360cfd2 Adapt for an actually correct sys/exec_elf.h 2001-06-19 12:07:50 +00:00
fvdl
a904f36474 Don't use multi-line string literals. 2001-06-19 12:07:21 +00:00
fvdl
d1d73371a6 Preliminary x86-64 support. Not fully functional yet (toolchain bugs). 2001-06-19 01:11:03 +00:00
nathanw
ed485c7ad5 Correct spelling in a comment. 2001-05-28 06:10:20 +00:00
christos
7ddeec7d69 s/warn/xwarnx/ cuts down size by 50% by not pulling in stdio. 2001-05-27 23:26:47 +00:00
christos
21d58e7713 Provide compatibility for the NetBSD-1.5 branch. Note that I used
__NetBSD_Version__ instead of checking if the macro was not already
defined.
2001-05-24 17:42:48 +00:00
christos
cb12da02ff Don't include <uvm/uvm_param.h>. It does not appear to be needed by anything.
<uvm/uvm_param.h> does not exist under 1.5.  Tested on i386 and sparc.
Anyway, if it is indeed needed by other platforms then we'll put it back,
but I don't see how since it does not define any types.
2001-05-24 17:41:42 +00:00
christos
f8ad0818e5 Unloading objects, can cause other objects whose reference count becomes
0 to be unloaded. Make sure that when we unload those objects we remove
any references to them from the globals list... This fixes SIGSEGV with
apache+mod_php+mysql.

XXX: This fix should be pulled up.

christos
2001-05-10 20:19:25 +00:00
kleink
63ccd3db5b Sync with <sys/exec_elf.h> rev. 1.45: ElfNN_RelA -> ElfNN_Rela. 2001-04-25 12:24:50 +00:00
christos
fc18ea2931 avoid nested extern 2001-02-04 22:11:12 +00:00
pk
38fd9b8f99 Avoid the use of a `switch(){}' statement before _rtld_init() is called.
`switch()' code may be translated using a jump table approach which causes
it to reference the equivalent of a global variable, something that must
be avoided before _rtld_init() has run.
2001-02-03 13:25:00 +00:00
christos
5d6793c06c back out previous commit; I found a better way of handling the missing
dependencies.
2001-01-14 09:39:26 +00:00
christos
61944ce838 Don't use ${OBJS} in the dependency line, cause it is not defined yet.
Also add a .NOTMAIN for good measure.
2001-01-14 09:16:47 +00:00
scw
b37a02f8c1 Define VARPSZ so dynamic binaries work on both 4K and 8K page size machines. 2000-12-21 09:12:54 +00:00
mycroft
48b362e14c More cruft. 2000-12-15 06:49:19 +00:00
mycroft
a19119777a Clean up cruft in here. 2000-12-15 06:46:22 +00:00
mycroft
6ec13b9d73 Return an error when there are too many segments rather than abort()ing.
This way `ldd /usr/libexec/ld.elf_so' doesn't core dump.
2000-11-26 05:22:15 +00:00
mycroft
0581ae5bad Make ldd(1) build again. 2000-11-10 23:53:04 +00:00