Commit Graph

47 Commits

Author SHA1 Message Date
scottr
372fe2ff92 Catch up with const changes to dlopen() and dlsym() prototypes in
<dlfcn.h>.  Tested on i386 and hp300 for crt0.o and ld.so, verified
other references by inspection.
1997-01-03 22:37:58 +00:00
pk
49dc4d2fe7 Deal with weak symbols when looking up in shared libraries. 1996-12-21 21:53:16 +00:00
pk
c51687391d Actually set the RTLD_DL flag in dlopen'ed shared objects, per PR#2791. 1996-10-06 19:03:32 +00:00
thorpej
7d468e4a0c Iff __m68k__, use a `slight hack' to determine the magic of the executable
we're doing a dynamic link for, and change the page size used for offset
and size calculations if necessary.  Allows the same ld.so to be used with
mixed m68k4k and m68k8k executables and libraries.

Thanks a million to Gordon Ross for the help in making this work!
1996-09-10 22:17:51 +00:00
pk
55d51fbb95 Relax checking of minor version number in `findhint()'. Also use the
directories from the hints (v.2) file for directory traversing.
This should take care of PR#1146.
1996-01-14 00:35:17 +00:00
pk
ccc1c895ef Deal with v.2 hint files (hint srch dirs not yet used). 1996-01-09 00:02:28 +00:00
pk
2bb60e32ec Make dlopen() search for libraries if given a name of the form
`lib<name>.so[.xx[.yy]]' (per Erik M. Theisen; PR#1763; patch from PR
used in simplified form).
1995-12-28 17:57:32 +00:00
pk
d04fcadcc2 Fix typo. 1995-10-09 09:24:59 +00:00
pk
9d43c41208 New style RCS IDs. 1995-10-09 00:09:39 +00:00
pk
b74b1d6456 Allow customized trace output, so ldd(1) can be more conveniently used
as a filter.

Rearrange cascading stuff: remove two-level limit.
1995-10-08 23:43:28 +00:00
pk
d4fe561742 Interface version 4:
implement dlexit() (per Doug Rabson)
	get actual rtld path from crt0
	pass ld_entry back to crt0 in a better place
1995-09-23 22:46:24 +00:00
pk
1a9159c7ba Check for zero sized BSS to avoid a big no-op syscall (per Mike Hibler). 1995-08-31 22:07:25 +00:00
pk
45359beaf4 Initialise after malloc (fixes PR#1149).
Also, correct comparison when looking in `prefered' paths.
1995-06-20 23:07:03 +00:00
pk
d680ed6b95 #include <dlfcn.h> 1995-06-05 00:08:38 +00:00
pk
fdd7092874 Cache two more environment variable values. 1995-06-04 23:21:35 +00:00
pk
ad760ce3d6 Implement compiled-in library search paths: any `-L' argument encountered
while `dynamic link-mode' is on, is recorded in the executable. The
run-time linker will search these paths after $LD_LIBRARY_PATH but
before the default set and those currently in the hints file.
The feature is disabled whenever for set[ug]id programs.
1995-06-04 21:56:22 +00:00
pk
28dba22b40 Fix bogosities in cascade stuff. 1995-04-01 20:56:55 +00:00
pk
b6340cabe2 Burn LD_RUN_PATH; I didn't read the SVR5 man-pages carefully enough. 1995-03-06 22:59:10 +00:00
pk
64edf8f86f Code from Matthew Green to do DL cascading "in the first degree".
Two `fprintf(stderr, ..)' => `warnx(..)'.
1995-03-06 20:51:24 +00:00
pk
e46ed32748 Bummer! Undo mmap() changes in rev. 1.26; they royally screw up the
kernel's pmap address preference mechanism.
1994-12-19 12:21:21 +00:00
pk
e2025017e0 Handle "/dev/zero" stuff more globally. 1994-12-18 16:05:49 +00:00
pk
b8937d605d Re-arrange mmap() calls, per Charles' suggestion. 1994-12-18 15:38:55 +00:00
pk
524e00b29b Ensure contiguous chunks for all of an object's address space (text+data+bss). 1994-12-07 20:30:53 +00:00
mycroft
15cea8b764 Don't close the hints file while it's mapped, but unmap and close it after
loading.
1994-10-26 20:21:42 +00:00
pk
233cc208f0 Re-add `LD_WARN_NON_PURE_CODE' that went missing. 1994-08-12 08:11:16 +00:00
pk
867591e7cb Relax minor version number checking somewhat; issue warning if minor
version is less than expected.
1994-08-07 10:34:40 +00:00
pk
009be1653a strdup() doesn't grok NULL pointers 1994-06-24 13:31:34 +00:00
pk
a43fd7b3a2 Conversion to err()/warn() for error reports. 1994-06-10 15:16:32 +00:00
pk
ca0065ab75 Another move to .data to please gdb. 1994-05-25 10:14:37 +00:00
pk
f28b14e8b3 Force some string constants into the data segment (for core-dump reading).
Rename internal dl_*() functions.
Do run-time symbol alias processing.
1994-05-24 10:44:06 +00:00
pk
f8af116033 dlopen() should make a copy of argument (Thomas Eberhardt). 1994-04-07 19:46:30 +00:00
cgd
95d6a185be no more MAP_FILE 1994-03-28 02:07:04 +00:00
pk
1bb4f06e2a Libraries which are in the hints file but not in one's LD_LIBRARY_PATH (if
set) were not found.
1994-02-15 22:51:23 +00:00
jtc
fc1d8f3bac Fix spelling error in Copyright notice 1994-01-29 01:54:01 +00:00
pk
d27581fb4b Use somewhat customized version of malloc, in stead of relying on a
crummy sbrk() backend; proper aligment must be guaranteed on all archs.
Drafting dlopen, dlsym, et.al.
1994-01-28 21:01:20 +00:00
pk
954ef13a90 Fill in gdb hook. 1994-01-12 19:19:09 +00:00
pk
0cc050772f Hooks for for shared C++ objects with static contructors/destructors. 1993-12-20 22:44:35 +00:00
pk
a711901191 Parcelled out the heap allocator into separate file.
Changes prototype for findshlib() (corrected library search order for ld).
1993-12-08 10:28:05 +00:00
pk
2d6241585d Do the debugger hooks.
Revised algorithm for finding symbols using `nz_other' (auxialiary type info).
1993-11-10 21:37:39 +00:00
pk
168c91b813 Use strsep() in stead of strtok() and restore colons in eg. env. vars. 1993-11-08 13:20:39 +00:00
pk
6e2bed1cac Print symbol name in "undefined" error msg. 1993-11-03 21:35:54 +00:00
mycroft
25d572fb12 This warning is fucking annoying, and ld already told us about it when we
linked the executable.  Make it #ifdef DEBUG.
1993-11-03 04:58:57 +00:00
pk
8ea3d67031 Search for top-of-stack blew up if program had no environment strings. 1993-10-26 19:30:13 +00:00
pk
843df2403a Support for `ld.so.hints'.
Handle set[ug]id programs.
No longer use the `lm_lob' field to access parent objects, add private
link map `parent' field in stead (SUN_COMPAT weirdness).
1993-10-22 21:18:58 +00:00
pk
7f6cef25a6 Renamed confusingly named macro.
Fixed bug that was the result of said confusion.
1993-10-21 00:00:09 +00:00
pk
1dff6d7850 Define our copy of `errno', as it is no longer defined in libc. 1993-10-17 15:40:11 +00:00
pk
3d68d0acae A linker supporting shared libraries (run-time part). 1993-10-16 21:54:08 +00:00