Commit Graph

23 Commits

Author SHA1 Message Date
Nate Williams 98c4ae7b2b Back out the thread_init code in order to allow -current to bootstrap
from -stable, until a better solution is found.

Submitted by:	Consensus of mailing list and the almighty Jordan :)
1996-01-30 05:55:20 +00:00
Julian Elischer f70177e76e Reviewed by: julian and (hsu?)
Submitted by:	 John Birrel(L?)

changes for threadsafe operations
1996-01-22 00:02:33 +00:00
Andrey A. Chernov 3e912c9dee Remove my locale hack. Sigh. 1995-11-02 12:42:42 +00:00
Poul-Henning Kamp 05fc2de514 Clean up and make code (more) readable. 1995-10-29 09:49:21 +00:00
Poul-Henning Kamp ee61b5a715 put the _getenv and _strncmp under #ifdef DEBUG, which is the only time
they are used.  Saves a few bytes here and there, nothing major.
1995-10-18 15:56:55 +00:00
Nate Williams 4d2131fbc9 Fixup the "ld.so failed" message for the case when ld.so finds undefined
symbols.

An easy example to see this is to develop an X program which links
against Xt, but doesn't add -lX11 to the link line.  It will link fine,
but cause run-time errors by ld.so because of missing symbols used by Xt
defined in X11.  This patch makes the errors more readable.

Submitted by:	jdp@polstra.com (John Polstra)
1995-09-27 23:13:33 +00:00
Doug Rabson 82aaeb09ad 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
Poul-Henning Kamp e9434bccf7 Remove an unused variable. 1995-02-24 07:51:13 +00:00
Jordan K. Hubbard 38f4fb1525 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
Andrey A. Chernov 662bfb6660 Call reduced (8-bit only) startup_setlocale() 1994-09-24 16:01:30 +00:00
Andrey A. Chernov 54335ac349 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
Andrey A. Chernov f32a347542 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
Garrett Wollman b4162996d5 Make it work with new mmap syscall. 1994-08-05 17:53:07 +00:00
Rodney W. Grimes f46145aa78 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 Williams 17682d0199 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
Jordan K. Hubbard 14a24404ef New dlopen, dlclose, etc al. For the new ld changes. 1994-02-13 20:53:11 +00:00
David Greenman 1799d2585e Implemented 'QMAGIC' a.out format correctly, and changed the default
output to be QMAGIC.
1994-01-03 18:35:54 +00:00
Paul Richards bfa077712f 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 Richards 44d76bb777 Added shared libs support from NetBSD. 1993-11-04 01:09:18 +00:00
David Greenman cd11d97905 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
Nate Williams 25a0fedd25 Added some support the new err(3) routines need
(Copied directly from NetBSD verbatim)
1993-06-29 04:34:12 +00:00
Paul Richards 52768b912b Upgrade to GCC 2.X 1993-06-18 02:04:48 +00:00
Rodney W. Grimes 5b81b6b301 Initial import, 0.1 + pk 0.2.4-B1 1993-06-12 14:58:17 +00:00