summaryrefslogtreecommitdiffstats
path: root/lib/csu/i386/crt0.c
Commit message (Collapse)AuthorAgeFilesLines
* Do not use __progname directly (except in [gs]etprogname(3)).markm2002-03-291-5/+7
| | | | | | Also, make an internal _getprogname() that is used only inside libc. For libc, getprogname(3) is a weak symbol in case a function of the same name is defined in userland.
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Fixed type mismatches in args to __syscall(). One for mmap() broke onbde1998-12-271-5/+5
| | | | | i386's with 64-bit longs -- the padding between mmap()'s 5th and 6th is an int, not a long. The other mismatches were benign.
* Remove the include of <dlfcn.h> from crt0.c; it is not needed nowjdp1998-02-111-2/+1
| | | | | | | that the dl* trampolines have been moved into libc. Move dlfcn.h from src/lib/csu/i386 into src/include. Nothing in src/lib/csu/i386 uses it any more.
* Move the trampolines for dlopen and related functions from crt0.ojdp1998-02-091-119/+17
| | | | | | | | | | | | | | | into libc. This reduces the size of every dynamically linked executable by 248 bytes, and it reduces the size of static executables by a lesser amount. It also eliminates some global namespace pollution. With this change in place, the source for dlfcn.h should probably be moved to "/usr/src/include". I'll save that for another day. Compatibility note: Programs which use dlopen, if compiled on systems with this change, will not run on systems with a libc from prior to this change. Very few programs use dlopen, so I think that is OK.
* Implement dladdr.jdp1998-02-061-9/+33
|
* const correctness for dl*()brian1997-11-221-9/+9
|
* Implement dlsym(RTLD_NEXT, symbol).jdp1997-08-021-8/+13
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise.
* Set the "crt_ldso" member of the crt-to-ld.so interface structure. Thisjdp1997-01-111-1/+2
| | | | | | | | | | was apparently overlooked at the time the member was added. Its absence causes some error messages from the dynamic linker to begin with "(null):" instead of with the pathname of the dynamic linker as they should. I am also adding a work-around to the dynamic linker, to cope with legacy binaries that were built with older versions of crt0.
* When linking with no rtld support, provide stub dl*() functions thatpeter1996-12-281-1/+43
| | | | | | | | | | | | | just return errors. This removes the need for awful hacks like that in our build of libtcl which would get link errors when linked static. John Polstra once mentioned that this was on his "todo" list. Note that one can use: cc -Wl,-Bstatic -o foo foo.o and get an executable that has it's libraries statically linked, but has a fully functional runtime linker so the executable can call dlopen() and have it work. (I've tested this)
* Remove garbage initcode reference so that 'gcc -Dlint ...'steve1996-10-061-2/+1
| | | | will compile without error.
* Support crt0 <-> ld.so interface version 4. This should be both backwardspeter1996-10-011-5/+11
| | | | | | | | | | and forwards compatable with version 3. This is needed to enable storing a run-time library path in the dynamic linking headers. The crt startup tries version 4 first, and falls back to version 3, so an executable that is linked on -current will work with the ld.so on 2.1.x and less. Reviewed by: nate, jdp Obtained from: NetBSD
* Back out the thread_init code in order to allow -current to bootstrapnate1996-01-301-8/+0
| | | | | | from -stable, until a better solution is found. Submitted by: Consensus of mailing list and the almighty Jordan :)
* Reviewed by: julian and (hsu?)julian1996-01-221-1/+9
| | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations
* Remove my locale hack. Sigh.ache1995-11-021-12/+1
|
* Clean up and make code (more) readable.phk1995-10-291-109/+94
|
* put the _getenv and _strncmp under #ifdef DEBUG, which is the only timephk1995-10-181-1/+6
| | | | they are used. Saves a few bytes here and there, nothing major.
* Fixup the "ld.so failed" message for the case when ld.so finds undefinednate1995-09-271-5/+16
| | | | | | | | | | | 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)
* Change ld.so to correctly load dependant libraries for dlopen and unload themdfr1995-06-271-2/+8
| | | | | | | | | | | | | | | | | 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>
* Remove an unused variable.phk1995-02-241-2/+1
|
* Support for more Sun compatible dlopen() and friends. Also added proper errorjkh1995-02-071-8/+9
| | | | | | handling. Reviewed by: gj Submitted by: Mark Diekhans <markd@grizzly.com>
* Call reduced (8-bit only) startup_setlocale()ache1994-09-241-2/+3
|
* Change level of setlocale hack enabling from compile option STARTUP_LOCALEache1994-09-191-6/+5
| | | | | | to check (via getenv) environment variable "ENABLE_STARTUP_LOCALE" at runtime. Submitted by: me per Bruce suggestion
* Add (#ifdef'ed by STARTUP_LOCALE) following line to crt0.cache1994-09-181-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Make it work with new mmap syscall.wollman1994-08-051-9/+9
|
* MAP_FILE is the default on mmap now, and is no longer defined justrgrimes1994-05-281-1/+8
| | | | like on a sun, so #define it to be 0 if we are running BSD >=199306.
* Allow NetBSD (old style) shared binaries to work. Probably not thenate1994-02-161-2/+2
| | | | final solution but at least this gets folks running -current up again.
* New dlopen, dlclose, etc al. For the new ld changes.jkh1994-02-131-145/+63
|
* Implemented 'QMAGIC' a.out format correctly, and changed the defaultdg1994-01-031-5/+5
| | | | output to be QMAGIC.
* shlib update:paul1993-11-091-5/+4
| | | | | Can get rid of local symbols with "ld -x -r" again. Made LDSO #ifdef DEBUG.
* Added shared libs support from NetBSD.paul1993-11-041-49/+391
|
* Yanked out the 8 'addb %al,%al' (0xc000)'s out of the start of thedg1993-10-261-8/+0
| | | | | | | 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.
* Added some support the new err(3) routines neednate1993-06-291-0/+12
| | | | (Copied directly from NetBSD verbatim)
* Upgrade to GCC 2.Xpaul1993-06-181-0/+5
|
* Initial import, 0.1 + pk 0.2.4-B1rgrimes1993-06-121-0/+108
OpenPOWER on IntegriCloud