summaryrefslogtreecommitdiff
path: root/lib/csu
Commit message (Collapse)AuthorAgeFilesLines
* Fixed double slashes in pathnames.Bruce Evans1998-05-311-2/+2
| | | | Notes: svn path=/head/; revision=36494
* ELF preparation step 2:Søren Schmidt1998-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... Notes: svn path=/head/; revision=36397
* Force BOOTSTRAP mode all the time while the headers are broken on alphaJohn Birrell1998-05-041-1/+5
| | | | | | | as the result of i386 changes. Notes: svn path=/head/; revision=35664
* Temporary fix for problems that occur if CFLAGS=-g is added toJohn Birrell1998-04-011-1/+2
| | | | | | | | /etc/make.conf. The tools can't handle generating debug code where we fiddle with the ELF segments. Notes: svn path=/head/; revision=34977
* Don't share sources with i386-elf. That was too difficult. 8-(John Birrell1998-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. Notes: svn path=/head/; revision=34487
* Sharing the crt sources with i386-elf wasn't too successful. The crtiJohn Birrell1998-03-113-20/+167
| | | | | | | | | | | | | | | | | | | | | 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. Notes: svn path=/cvs2svn/branches/jb/; revision=34484
* Trash startup sources from NetBSD in favour of jdp's FreeBSD sourceJohn Birrell1998-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. Notes: svn path=/head/; revision=34454
* Import a sanitized version of jdp's crt1.c from i386-elf. I have removedJohn Birrell1998-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. Notes: svn path=/cvs2svn/branches/jb/; revision=34452
* Import C startup files for ELF support.John Polstra1998-03-0712-0/+526
| | | | | | | Submitted by: John Polstra <jdp@polstra.com> Notes: svn path=/cvs2svn/branches/JDP/; revision=34198
* Remove the include of <dlfcn.h> from crt0.c; it is not needed nowJohn Polstra1998-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. Notes: svn path=/head/; revision=33236
* Move the trampolines for dlopen and related functions from crt0.oJohn Polstra1998-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. Notes: svn path=/head/; revision=33180
* Implement dladdr.John Polstra1998-02-064-13/+169
| | | | Notes: svn path=/head/; revision=33137
* ${TARGET} -> ${.TARGET}Eivind Eklund1998-01-121-2/+2
| | | | | | | Tiny pointed hat goes to: Our Makefile-meister. Notes: svn path=/head/; revision=32484
* CSU source for Alpha obtained from NetBSD. The makefile will requireJohn Birrell1998-01-114-0/+419
| | | | | | | more work when we get a half-way usable libc (which is next). Notes: svn path=/head/; revision=32417
* const correctness for dl*()Brian Somers1997-11-223-15/+15
| | | | Notes: svn path=/head/; revision=31342
* Make this file p-make clean. (Use "ld -O foo" instead of "ld; mvSatoshi Asami1997-10-111-11/+6
| | | | | | | | | a.out foo".) Reviewed by: bde (actually more like "Suggested by") Notes: svn path=/head/; revision=30291
* Sort cross refereces in section SEE ALSO.Wolfram Schneider1997-09-291-2/+3
| | | | Notes: svn path=/head/; revision=29988
* Implement dlsym(RTLD_NEXT, symbol).John Polstra1997-08-023-8/+42
| | | | Notes: svn path=/head/; revision=27838
* Use our copy of dlfcn.h, not the version in /usr/include, which may notMike Smith1997-04-301-2/+2
| | | | | | | | be up-to-date when we are building. Submitted by: Terry Lambert <terry@lambert.org> Notes: svn path=/head/; revision=25296
* Declare the constructor/destructor linker sets as extern rather thanJohn Polstra1997-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. Notes: svn path=/head/; revision=24756
* Fix an error in the previous revision that caused make world breakage.John Polstra1997-04-021-1/+3
| | | | Notes: svn path=/head/; revision=24553
* Simplified install rule.Bruce Evans1997-04-011-6/+2
| | | | Notes: svn path=/head/; revision=24488
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-223-3/+3
| | | | Notes: svn path=/head/; revision=22993
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-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. Notes: svn path=/head/; revision=21673
* Convert to mdoc format.John Polstra1997-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. Notes: svn path=/head/; revision=21619
* Add definitions of RTLD_LAZY and RTLD_NOW.John Polstra1997-01-121-0/+6
| | | | Notes: svn path=/head/; revision=21616
* Set the "crt_ldso" member of the crt-to-ld.so interface structure. ThisJohn Polstra1997-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. Notes: svn path=/head/; revision=21571
* Use ${COPY} instead of -C for installing non-source files. crt*.oBruce Evans1997-01-011-2/+2
| | | | | | | | should be installed using the same flag as libraries, but ${COPY} is currently used for libraries. Notes: svn path=/head/; revision=21158
* When linking with no rtld support, provide stub dl*() functions thatPeter Wemm1996-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) Notes: svn path=/head/; revision=20975
* Fixed prototyping of dlopen/dlsym in dlfcn.h, to match how crt0.c definesMarc G. Fournier1996-10-081-2/+2
| | | | | | | | | it and link.h prototypes it Error of my ways pointed out by Peter Notes: svn path=/head/; revision=18802
* Remove garbage initcode reference so that 'gcc -Dlint ...'Steve Price1996-10-061-2/+1
| | | | | | | will compile without error. Notes: svn path=/head/; revision=18735
* Support crt0 <-> ld.so interface version 4. This should be both backwardsPeter Wemm1996-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 Notes: svn path=/head/; revision=18593
* cmp -s || install -c --> install -CPeter Wemm1996-08-301-7/+5
| | | | Notes: svn path=/head/; revision=17927
* ``mv'' -> ``mv -f''Wolfram Schneider1996-05-071-6/+6
| | | | | | | | ``rm'' -> ``rm -f'' so mv/rm may not ask for confirmation if you are not root Notes: svn path=/head/; revision=15679
* Changed the dimensions of __CTOR_LIST__ and __DTOR_LIST__ from 0John Polstra1996-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__. Notes: svn path=/head/; revision=14161
* Back out the thread_init code in order to allow -current to bootstrapNate Williams1996-01-301-8/+0
| | | | | | | | | from -stable, until a better solution is found. Submitted by: Consensus of mailing list and the almighty Jordan :) Notes: svn path=/head/; revision=13727
* Reviewed by: julian and (hsu?)Julian Elischer1996-01-221-1/+9
| | | | | | | | | Submitted by: John Birrel(L?) changes for threadsafe operations Notes: svn path=/head/; revision=13545
* Check the count in the first word of __CTOR_LIST__ before executingJohn Polstra1996-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) Notes: svn path=/head/; revision=13441
* This commit was generated by cvs2svn to compensate for changes in r13122,Peter Wemm1995-12-301-3/+0
| | | | | | | which included commits to RCS files with non-trunk default branches. Notes: svn path=/head/; revision=13123
* recording cvs-1.6 file deathPeter Wemm1995-12-302-436/+0
| | | | Notes: svn path=/cvs2svn/branches/ATT/; revision=13122
* Remove my locale hack. Sigh.Andrey A. Chernov1995-11-022-14/+3
| | | | Notes: svn path=/head/; revision=12009
* Clean up and make code (more) readable.Poul-Henning Kamp1995-10-292-111/+96
| | | | Notes: svn path=/head/; revision=11912
* Fixed dependencies for scrt0.o.Bruce Evans1995-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. Notes: svn path=/head/; revision=11676
* -fomit-frame-pointer is becomming an increasingly popular optimization,Poul-Henning Kamp1995-10-201-2/+2
| | | | | | | | so before somebody screws up royally, make sure this always works by adding a -fno-omit-frame-pointer here. Notes: svn path=/head/; revision=11592
* put the _getenv and _strncmp under #ifdef DEBUG, which is the only timePoul-Henning Kamp1995-10-181-1/+6
| | | | | | | they are used. Saves a few bytes here and there, nothing major. Notes: svn path=/head/; revision=11562
* Create a scrt0.o file that specifically excludes the shared-lib support.David Greenman1995-10-181-6/+11
| | | | | | | This will be used for -static programs. Notes: svn path=/head/; revision=11556
* Fixup the "ld.so failed" message for the case when ld.so finds undefinedNate Williams1995-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) Notes: svn path=/head/; revision=11039
* Install source files with the -c flag, not with the optional flag ${COPY}.Bruce Evans1995-08-061-2/+2
| | | | Notes: svn path=/head/; revision=9971
* Change `install' to `${INSTALL}' so that default install flags can beBruce Evans1995-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. Notes: svn path=/head/; revision=9970
* Numerous Makefile fixes:Garrett 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. Notes: svn path=/head/; revision=9378