summaryrefslogtreecommitdiffstats
path: root/lib/csu
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* Use ${COPY} instead of -C for installing non-source files. crt*.obde1997-01-011-2/+2
| | | | | should be installed using the same flag as libraries, but ${COPY} is currently used for libraries.
* 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)
* Fixed prototyping of dlopen/dlsym in dlfcn.h, to match how crt0.c definesscrappy1996-10-081-2/+2
| | | | | | it and link.h prototypes it Error of my ways pointed out by Peter
* 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
* cmp -s || install -c --> install -Cpeter1996-08-301-7/+5
|
* ``mv'' -> ``mv -f''wosch1996-05-071-6/+6
| | | | | ``rm'' -> ``rm -f'' so mv/rm may not ask for confirmation if you are not root
* Changed the dimensions of __CTOR_LIST__ and __DTOR_LIST__ from 0jdp1996-02-201-14/+6
| | | | | | | | | | | | | | to 2. This makes them agree with the declarations in libgcc, and clears the way once again for linking c++rt0.o into all libraries, and eliminating CPLUSPLUSLIB from <bsd.lib.mk>. (I have not made that change yet, because there is still a bootstrapping problem for "make world".) Also, removed a check which ensured that the constructor count in the first word of __CTOR_LIST__ was greater than zero before traversing the list. I had added that check earlier, but it is no longer necessary, now that there is guaranteed to be at least 2 words in __CTOR_LIST__.
* 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
* Check the count in the first word of __CTOR_LIST__ before executingjdp1996-01-151-4/+12
| | | | | | | | | | | | | | | | | the loop that invokes the static constructors. That makes it safe to link c++rt0.o into any shared library, even one that does not have any static constructors. Formerly, doing that would cause a bus error. If the library has no static constructors, __CTOR_LIST__ comes out as a simple 4-byte COMMON region, and it does not have the usual NULL word that terminates the list of constructors. This caused the old code to "call" a garbage address via the non-existent entry __CTOR_LIST__[1]. The analogous code that invokes the static destructors was already safe. This change is fully backward-compatible. Reviewed by: dfr@render.com (Doug Rabson)
* This commit was generated by cvs2svn to compensate for changes in r13122,peter1995-12-301-3/+0
| | | | which included commits to RCS files with non-trunk default branches.
* recording cvs-1.6 file deathpeter1995-12-302-436/+0
|
* Remove my locale hack. Sigh.ache1995-11-022-14/+3
|
* Clean up and make code (more) readable.phk1995-10-292-111/+96
|
* Fixed dependencies for scrt0.o.bde1995-10-221-7/+14
| | | | | | Build a static gcrt0.o (sgcrt0.o) too. Currently only the dynamic gcrt0.o is used, although -pg forces -static. Sorted the .o targets.
* -fomit-frame-pointer is becomming an increasingly popular optimization,phk1995-10-201-2/+2
| | | | | so before somebody screws up royally, make sure this always works by adding a -fno-omit-frame-pointer here.
* 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.
* Create a scrt0.o file that specifically excludes the shared-lib support.dg1995-10-181-6/+11
| | | | This will be used for -static programs.
* 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)
* Install source files with the -c flag, not with the optional flag ${COPY}.bde1995-08-061-2/+2
|
* Change `install' to `${INSTALL}' so that default install flags can bebde1995-08-061-3/+4
| | | | | | | specified in the top level Makefiles. Previously I missed dozens of Makefiles that skip the install after using `cmp -s' to decide that the install isn't necessary.
* Numerous Makefile fixes:wollman1995-06-301-11/+30
| | | | | | | | 1) Do dependencies. 2) Install all appropriate links to manual pages. 3) Install header file in `beforeinstall' like all the rest. 4) Install header file only if changed. 5) Install object files only if changed.
* Change ld.so to correctly load dependant libraries for dlopen and unload themdfr1995-06-272-4/+16
| | | | | | | | | | | | | | | | | 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 trailing whitespace.rgrimes1995-05-301-2/+2
|
* Install the dlopen.3 manpage.phk1995-03-301-2/+2
|
* Remove an unused variable.phk1995-02-241-2/+1
|
* Install the header files.jkh1995-02-091-1/+3
|
* Add two parts of Mark's/Gary's dlopen() changes that I missed before.jkh1995-02-082-0/+244
|
* Support for more Sun compatible dlopen() and friends. Also added proper errorjkh1995-02-072-9/+11
| | | | | | 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-192-9/+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-182-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | (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
* Remove dead code. gmon stuff is now done better in libc/gmon anbde1994-08-221-11/+3
| | | | | | | | | <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.
* 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.
* From Jordan via. Paul K.nate1994-03-092-5/+85
| | | | | | | | 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.
* 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.
* Adding embryonic C++ shared lib support (all tests positive so far).jkh1993-12-241-12/+16
|
* -r option incorrectly removed:ache1993-11-181-2/+2
| | | | it is impossible to make gcrt0.o from moncrt0.o and gmon.o without it.
* Removed all the ld -x -r stuff -- paranoia.paul1993-11-161-8/+9
|
* shlib update:paul1993-11-092-9/+8
| | | | | Can get rid of local symbols with "ld -x -r" again. Made LDSO #ifdef DEBUG.
* Removed install -d line since our install doesn't support the -dpaul1993-11-071-2/+1
| | | | option.
* Added shared libs support from NetBSD.paul1993-11-044-57/+403
|
* 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 ${COPY} knob to the install commandsroot1993-07-031-1/+1
|
* Added some support the new err(3) routines neednate1993-06-291-0/+12
| | | | (Copied directly from NetBSD verbatim)
OpenPOWER on IntegriCloud