Commit Graph

30 Commits

Author SHA1 Message Date
dfr
53a0558e1b Change ld.so to correctly load dependant libraries for dlopen and unload them
on dlclose.  Also correctly call constructors and destructors for libraries
linked with /usr/lib/c++rt0.o.
Change interpretation of dlopen manpage to call _init() rather than init()
for dlopened objects.
Change c++rt0.o to avoid using atexit to call destructors, allowing dlclose to
call destructors when an object is unloaded.
Change interface between crt0 and ld.so to allow crt0 to call a function on
exit to call destructors for shared libraries explicitly.

These changes are backwards compatible.  Old binaries will work with the new
ld.so and new binaries will work with the old ld.so.  A version number has
been introduced in the crt0-ld.so interface to allow for future changes.

Reviewed by:	GAWollman, Craig Struble <cstruble@singularity.bevc.blacksburg.va.us>
1995-06-27 09:53:27 +00:00
rgrimes
1c444a9f7e Remove trailing whitespace. 1995-05-30 05:51:47 +00:00
phk
80fd730707 Install the dlopen.3 manpage. 1995-03-30 06:40:31 +00:00
phk
dc0f1ddc60 Remove an unused variable. 1995-02-24 07:51:13 +00:00
jkh
257b085295 Install the header files. 1995-02-09 08:00:20 +00:00
jkh
b1f15c38fc Add two parts of Mark's/Gary's dlopen() changes that I missed before. 1995-02-08 17:56:27 +00:00
jkh
1e9d52ac8b Support for more Sun compatible dlopen() and friends. Also added proper error
handling.
Reviewed by:    gj
Submitted by:   Mark Diekhans <markd@grizzly.com>
1995-02-07 13:27:29 +00:00
ache
8380e16daa Call reduced (8-bit only) startup_setlocale() 1994-09-24 16:01:30 +00:00
ache
178cbb3bbc Change level of setlocale hack enabling from compile option STARTUP_LOCALE
to check (via getenv) environment variable "ENABLE_STARTUP_LOCALE" at
runtime.
Submitted by: me per Bruce suggestion
1994-09-19 02:00:21 +00:00
ache
942075f6f5 Add (#ifdef'ed by STARTUP_LOCALE) following line to crt0.c
(void) setlocale(LC_ALL, "");

It will be easiest way now to make national chars available
for all ctype-oriented programs at once by simple:

setenv LANG Your_National_Charset

Default case (without "LANG" environment
variable) will be fully ANSI compatible (got "C" locale).

If "LANG" variable present, extention becomes active.

Effect of this extention is great: in one time all ctype
oriented programs can accept/print national characters
without any touching source/binary code, it is big win, IMHO.

This method is fully compatible with ISO8859-* and russian koi8-r
too (in general -- with all 8-bit character sets). I think
it is very useful.
I got this idea from Xenix locale implementation.

This extention is even never compiled in, unless you set
	setenv STARTUP_LOCALE
before rebuilding crt0.c or corresponding variable in /etc/make.conf
1994-09-18 22:21:04 +00:00
bde
d7b8f740f1 Remove dead code. gmon stuff is now done better in libc/gmon an
<machine/profile.h>.  The old version was writing an incomplete
header without the profrate field that is necessary to handle the
current faster profiling clock.  The counters that are where the
the profrate should be are usually 0 and gprof converts a profrate
of 0 to hz so the old version gave times too large by a factor of
profhz/hz = 10.24.
1994-08-22 15:13:41 +00:00
wollman
efc3bf4732 Make it work with new mmap syscall. 1994-08-05 17:53:07 +00:00
rgrimes
5c08450f86 MAP_FILE is the default on mmap now, and is no longer defined just
like on a sun, so #define it to be 0 if we are running BSD >=199306.
1994-05-28 13:59:16 +00:00
nate
4e18bd31f8 From Jordan via. Paul K.
This fixes the problems Warner's having with ctors not being called
again with the latest round of ld changes and updates the file-names to what
Paul is using now.

The name change will not affect anything as we are not (yet) using it.
1994-03-09 17:12:59 +00:00
nate
b88452c371 Allow NetBSD (old style) shared binaries to work. Probably not the
final solution but at least this gets folks running -current up again.
1994-02-16 19:26:39 +00:00
jkh
92f287873a New dlopen, dlclose, etc al. For the new ld changes. 1994-02-13 20:53:11 +00:00
dg
8bc542a60d Implemented 'QMAGIC' a.out format correctly, and changed the default
output to be QMAGIC.
1994-01-03 18:35:54 +00:00
jkh
866c689960 Adding embryonic C++ shared lib support (all tests positive so far). 1993-12-24 02:11:37 +00:00
ache
9c22e5bb70 -r option incorrectly removed:
it is impossible to make gcrt0.o from moncrt0.o and gmon.o without it.
1993-11-18 00:08:03 +00:00
paul
3f9b37efec Removed all the ld -x -r stuff -- paranoia. 1993-11-16 02:22:16 +00:00
paul
6ab451c484 shlib update:
Can get rid of local symbols with "ld -x -r" again.
Made LDSO #ifdef DEBUG.
1993-11-09 04:26:11 +00:00
paul
e31d3bbcc6 Removed install -d line since our install doesn't support the -d
option.
1993-11-07 03:05:40 +00:00
paul
eb0155c0b9 Added shared libs support from NetBSD. 1993-11-04 01:09:18 +00:00
dg
db5c3ded26 Yanked out the 8 'addb %al,%al' (0xc000)'s out of the start of the
program. The idea was that these are 'alignment' crap, but the image
is 16byte-aligned without these. Location 0 still doesn't have a 0,
but who cares, binaries wil be built with page zero unmapped in the
near future.
1993-10-26 09:04:13 +00:00
root
e52b688b2f Added ${COPY} knob to the install commands 1993-07-03 00:21:21 +00:00
nate
02f4f7db9a Added some support the new err(3) routines need
(Copied directly from NetBSD verbatim)
1993-06-29 04:34:12 +00:00
paul
b803a1954d Upgrade to GCC 2.X 1993-06-18 02:04:48 +00:00
rgrimes
e209a83c1e This commit was generated by cvs2svn to compensate for changes in r4,
which included commits to RCS files with non-trunk default branches.
1993-06-12 14:58:17 +00:00
rgrimes
e7bc108f0d Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00
rgrimes
48231afadc Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00