summaryrefslogtreecommitdiffstats
path: root/lib/csu
Commit message (Collapse)AuthorAgeFilesLines
* Remove the bootstrap hack that prevented the use of the rtld.jb1998-08-202-24/+3
|
* Fixed double slashes in pathnames.bde1998-05-311-2/+2
|
* ELF preparation step 2:sos1998-05-261-2/+2
| | | | | | | | | | | | | | Move a.out libraries to /usr/lib/aout to make space for ELF libs. Make rtld usr /usr/lib/aout as default library path. Make ldconfig reject /usr/lib as an a.out library path. Fix various Makefiles for LIBDIR!=/usr/lib breakage. This will after a make world & reboot give a system that no longer uses /usr/lib/*, infact one could remove all the old libraries there, they are not used anymore. We are getting close to an ELF make world, but I'll let this all settle for a week or two...
* Force BOOTSTRAP mode all the time while the headers are broken on alphajb1998-05-041-1/+5
| | | | as the result of i386 changes.
* Temporary fix for problems that occur if CFLAGS=-g is added tojb1998-04-011-1/+2
| | | | | /etc/make.conf. The tools can't handle generating debug code where we fiddle with the ELF segments.
* Bring these back from the dead.jb1998-03-112-0/+99
|
* Don't share sources with i386-elf. That was too difficult. 8-(jb1998-03-111-4/+7
| | | | | | | | Add a bootstrap mode so that non-rtld versions of these objects can be built when bootstrapping the system with NetBSD tools, headers and libraries. Once the FreeBSD tools are built, the FreeBSD headers are installed and *then* these objects can be recompiled with the rtld references. Phew.
* This commit was generated by cvs2svn to compensate for changes in r34484,jb1998-03-111-20/+68
|\ | | | | | | which included commits to RCS files with non-trunk default branches.
| * Sharing the crt sources with i386-elf wasn't too successful. The crtijb1998-03-113-108/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | asm code didn't link the way it was supposed to and the calling convention for the entry "function" turned out to be very different. On alpha it's a true function, but on i386 it's a fudge. Blech. So jdp suggested keeping separate sets of source and avoiding lots of #ifdefs. These files are based on his i386-elf code, with crt1.c borrowing code from NetBSD's crt0. The copyright reflects that. Complicating matters, the code turned out to be difficult to bootstrap build using NetBSD tools. To compile against the FreeBSD rtld header requires FreeBSD specific headers, but these can't be installed until the tools are built, and they can't be built without the FreeBSD crt objects. Anal retentive. So I introduced a HAVE_RTLD #define that isn't set during the build process until all the tools are built and the headers installed.
* | Trash startup sources from NetBSD in favour of jdp's FreeBSD sourcejb1998-03-104-419/+23
| | | | | | | | | | | | | | | | | | now that has been committed. The makefile is derived from the i386-elf version, modified to pick up most of the source (except crt1.c) from i386-elf. With minor changes to i386-elf/crt1.c, this directory can be combined with i386-elf to be a single csu/elf directory for all seasons.
* | This commit was generated by cvs2svn to compensate for changes in r34452,jb1998-03-101-0/+63
|\ \ | |/ | | | | which included commits to RCS files with non-trunk default branches.
| * Import a sanitized version of jdp's crt1.c from i386-elf. I have removedjb1998-03-101-0/+63
| | | | | | | | | | | | | | the rtld code pending implementation on the alpha. The csu/i386-elf should be renamed as csu/elf and this directory trashed. Consider this a temporary implementation.
| * This commit was manufactured by cvs2svn to create branch 'jb'.cvs2svn1998-01-117-1182/+0
| |
* | This commit was generated by cvs2svn to compensate for changes in r34198,jdp1998-03-076-0/+263
|\ \ | | | | | | | | | which included commits to RCS files with non-trunk default branches.
| * | Import C startup files for ELF support.jdp1998-03-076-0/+263
| / | | | | | | Submitted by: John Polstra <jdp@polstra.com>
* | Import C startup files for ELF support.jdp1998-03-076-0/+263
| | | | | | | | Submitted by: John Polstra <jdp@polstra.com>
* | Remove the include of <dlfcn.h> from crt0.c; it is not needed nowjdp1998-02-113-79/+3
| | | | | | | | | | | | | | 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-094-481/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-064-13/+169
| |
* | ${TARGET} -> ${.TARGET}eivind1998-01-121-2/+2
|/ | | | Tiny pointed hat goes to: Our Makefile-meister.
* CSU source for Alpha obtained from NetBSD. The makefile will requirejb1998-01-114-0/+419
| | | | more work when we get a half-way usable libc (which is next).
* const correctness for dl*()brian1997-11-223-15/+15
|
* Make this file p-make clean. (Use "ld -O foo" instead of "ld; mvasami1997-10-111-11/+6
| | | | | | a.out foo".) Reviewed by: bde (actually more like "Suggested by")
* Sort cross refereces in section SEE ALSO.wosch1997-09-291-2/+3
|
* Implement dlsym(RTLD_NEXT, symbol).jdp1997-08-023-8/+42
|
* Use our copy of dlfcn.h, not the version in /usr/include, which may notmsmith1997-04-301-2/+2
| | | | | be up-to-date when we are building. Submitted by: Terry Lambert <terry@lambert.org>
* Declare the constructor/destructor linker sets as extern rather thanjdp1997-04-091-3/+24
| | | | | | | | | | | | | | | | | common. Add one do-nothing element to each set. This ensures that the linker realizes that they are linker sets rather than simple commons, and makes it possible to link c++rt0.o into every shared library regardless of whether it is a C++ library or not. Without this change, the constructors and destructors in the main program could be executed multiple times. This change is going to make it possible to get rid of the CPLUSPLUSLIB makefile variable once and for all. It is a piece of the solution to PR gnu/3505 (gcc -shared). Finally, it fixes a heretofore unreported bug: If CPLUSPLUSLIB was set in a makefile for a C++ shared library that had no static constructors or destructors in it, then the main program's constructors and destructors would be executed multiple times.
* Fix an error in the previous revision that caused make world breakage.jdp1997-04-021-1/+3
|
* Simplified install rule.bde1997-04-011-6/+2
|
* Revert $FreeBSD$ to $Id$peter1997-02-223-3/+3
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-143-3/+3
| | | | | | | | 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.
* Convert to mdoc format.jdp1997-01-121-136/+152
| | | | | | | Add descriptions of RTLD_LAZY and RTLD_NOW. Correct the synopsis to agree with the actual function prototypes. Add clarifications of a few things. Clean up the wording in a few places.
* Add definitions of RTLD_LAZY and RTLD_NOW.jdp1997-01-121-0/+6
|
* 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.
OpenPOWER on IntegriCloud