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
mycroft
0581ae5bad
Make ldd(1) build again.
2000-11-10 23:53:04 +00:00
mycroft
2d376bed2b
When dlopen()ing with RTLD_GLOBAL, also make dependent libraries RTLD_GLOBAL.
2000-11-10 21:31:30 +00:00
scottb
b5de616825
copy the real object filename to the rtld object path so that the
...
Dl_info structure can be properly filled by dladdr().
2000-08-28 04:15:54 +00:00
mycroft
94581370f5
The ELF ABI declares that argc must fill an `argument slot'. Make it so.
...
For __sparc_v9__ only, do a hack to make executables work temporarily before
and after the kernel is switched.
2000-07-26 15:40:07 +00:00
mycroft
43cfeb27a9
Catch up with type changes. Also:
...
* Apply DT_PLTRELSZ to (one of) pltrel or pltrela *after* we've finished
parsing the headers, so we know which one.
* Fix sparc64 bogons. (It works now!)
2000-07-26 02:07:34 +00:00
thorpej
a8248dcc27
Make it build on non-VARPSZ again.
2000-07-19 15:01:16 +00:00
eeh
55c1b7fb0d
Fix some issues with SPARC V9 ELF binaries.
2000-07-18 22:33:55 +00:00
matt
824a084272
More VAX ELF changes.
2000-07-17 02:55:52 +00:00
matt
cc5d6b2a4d
Initialize ld.elf_so's textsize.
2000-07-14 21:59:58 +00:00
christos
baeb94e0b1
Also set __mainprog_obj so .ini sections can call dlopen()
2000-06-16 19:51:05 +00:00
jdolecek
06d16ede1e
slighly move the assert() added in last commit, so that it's
...
actually useful
2000-06-03 06:51:57 +00:00
jdolecek
2a05365bbb
_rtld_unref_dag(): needed->obj might be null if the unreffed object has
...
some unsatisfied references (most often when compiled without necessary
-Wl,-R), so check for that instead of causing null-dereference;
this way the code has a chance to cleanup after itself and report
the error to caller
Thanks to Jason Thorpe for helping fix this!
2000-06-02 22:52:28 +00:00
erh
a497b0d8ab
Cause ld.elf_so to find the symbols for __progname and environ and set them. If we wait until crt0 gets around to doing it it's too late for any library init functions.
2000-04-15 05:41:46 +00:00
christos
46d52e1ec5
re-indent sanely _rtld_dlsym() [no functional change]
2000-04-15 05:27:49 +00:00
kleink
65b8f3b2eb
Change _rtld_dlclose() to unload the object via _rtld_unload_object() rather
...
than by itself. Besides being duplicated code the open-coded version
also did not take care of cleaning up after the object's DAG(!).
Fixes PR bin/8905.
2000-02-07 19:02:49 +00:00
christos
ea816c78b2
Enable parsing and mapping of hardware dependent libraries in ld.so.conf
...
To be documented in the man page.
1999-12-13 09:09:34 +00:00
thorpej
3bf43967ff
Name consistencty nit: curmark -> _rtld_curmark
1999-11-10 18:48:19 +00:00
thorpej
70e2953dac
Some slight cosmetic cleanup.
1999-11-10 18:34:49 +00:00
mycroft
305c949781
Changes from msaitoh to fix local/global symbol confusion, and to fix weak
...
symbol support -- updated by me for elf.h changes.
1999-11-07 00:21:12 +00:00
kleink
522cbf0248
Update to match new SVR4-style definition names in <sys/exec_elf.h>.
1999-10-25 13:55:06 +00:00
christos
fb292d7f02
enable /etc/ld.so.conf processing
...
[reviewed by thorpej]
1999-08-19 23:42:15 +00:00
kleink
1cc052ce00
Rearrange the shared library search path precedences to LD_LIBRARY_PATH >
...
runpath > built-in default; this is the behaviour of the SVR4 shared loader,
and gives users the opportunity to override the runpath. (Addresses a report
on current-users by John Kohl.)
1999-08-01 19:47:07 +00:00
thorpej
4d256c199f
When dlopen()'ing a shared object without an absolute pathname, search
...
for it in the rpath of the main program as well as the path specified
in LD_LIBRARY_PATH.
1999-07-22 00:18:19 +00:00
kleink
571aef82d9
Don't include the ident .note assembly when linting.
1999-06-15 15:54:28 +00:00
kleink
8b74e6d78e
Implement LD_PRELOAD support.
1999-05-31 14:48:16 +00:00
ws
bf9c27b80b
Add code to use the kernel provided page size.
...
Enable this on the powerpc only for now.
1999-04-18 19:40:06 +00:00
kleink
3b03384405
Update an i386-ismed comment.
1999-03-08 10:44:25 +00:00
christos
ec2edc19fd
Make this compile without -DRTLD_LOADER and fix printf format problems on
...
the alpha.
1999-03-03 21:18:00 +00:00
christos
26475619ed
KNF
1999-03-01 16:40:07 +00:00
pk
a32bf0c1c2
Just initialize the stack-based temporary `rtld self' object.
1999-02-27 10:35:16 +00:00
christos
84cb65780e
Cleanup global variable access so rtld can be self relocating. Also KNF
...
reloc.c and move md sparc parts to arch/sparc/mdreloc.c
Now we don't need to load at address 0 on the i386 and the mips should be
trivial to fix.
1999-02-24 18:31:00 +00:00
christos
d72f81978d
Add i386 bits
1999-01-10 18:18:56 +00:00
castor
dc6b4c42a3
Restore missing variable declaration with -DRTLD_DEBUG
1999-01-09 18:10:19 +00:00
ross
b899771419
Rewrite AuxInfo handling to track AuxID changes in sys/exec_elf.h.
1998-10-07 02:53:27 +00:00
tv
3ecc6b044e
Some local changes accidentally made it into the last commit; back that
...
part out (noticed by mycroft; thanks!)
1998-07-15 11:26:28 +00:00
tv
77a275d732
Change ld.so default behavior to RTLD_LOCAL, and make RTLD_LOCAL into a
...
new flag bit. Keep RTLD_GLOBAL as an actual flag bit so it won't be
re-used, or may be used for something later. Mask the dlopen() mode bits
in ld.elf_so so a comparison against RTLD_NOW works. (RTLD_{LOCAL,GLOBAL}
needs to be implemented for ld.elf_so.)
1998-07-14 22:18:36 +00:00
mhitch
c01fadd882
Don't forget to update _rtld_objtail when _rtld_dlclose() removes the
...
current tail entry.
1998-06-16 03:24:13 +00:00
mhitch
082edecc20
Add support for mips.
1998-03-25 04:12:32 +00:00
mrg
896c1cce87
WARNS?=1
1997-10-08 08:55:35 +00:00
cgd
7631ac43fd
make sure that ld.elf_so's path is in the data segment
1997-04-15 07:15:46 +00:00
cgd
fbf6ff628e
put in two identifying notes, which new binutils snapshots will turn
...
into PT_NOTE sections so they can be examined by execve() to figure
out whether this is a native binary, what emulation it's to be run under,
etc.
1997-03-21 05:39:42 +00:00
cgd
0b2b5475a4
nclude dlfcn.h, and pull RLTD_LAZY in from there. Assume that RTLD_NOW is
...
RLTD_LAZY + 1 (for now), if it's not defined. RTLD_NOW should be defined
in dlfcn.h, since some code (e.g. X11) wants it and assumes that it has
the value currently used by our RTLD_LAZY.
1996-12-18 22:27:29 +00:00
cgd
41fe218b25
First cut at an ELF shared loader. Originally from John Polstra's FreeBSD elf
...
kit, then hacked on by Matt Thomas <matt@3am-software.com>, then by me (to
make it work with new versions of the toolchain, etc.). This runs, but it's
in serious need of cleaning and/or a fair bit of reworking. See the README
file for more information, and a list of things to do.
1996-12-16 20:37:55 +00:00