aboutsummaryrefslogtreecommitdiff
path: root/lib/csu/common/crtbegin.c
Commit message (Collapse)AuthorAgeFilesLines
* lib: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Run __cxa_finalize in shared objects in the destructor path.Andrew Turner2018-11-131-3/+24
| | | | | | | | | | | | When we have .dtors call them before .dtor handling, otherwise call from a destructor. PR: 233056 MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=340395
* Add __used to __CTOR_LIST__ and __DTOR_LIST__Ed Maste2018-10-311-2/+2
| | | | | | | | | | | | | | | | Enabling BSD_CRTBEGIN on amd64 resulted in error: unused variable '__CTOR_LIST__'. __CTOR_LIST__ is indeed unused in crtbegin.c; it marks the beginning of the .ctors array and is used in crtend.c. Annotate __DTOR_LIST__ as well for consistency. Discussed with: andrew MFC with: r339738 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=339954
* Make the .ctors, .dtors, and .jcr markers as static. They shouldn't beAndrew Turner2018-10-291-3/+3
| | | | | | | | | | accessible from out of the files they are defined in. MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339866
* Add __dso_handle to the BSD crtbegin. This is used to identify sharedAndrew Turner2018-10-261-0/+8
| | | | | | | | | | objects. MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339773
* Implement a BSD licensed crtbegin/crtendAndrew Turner2018-10-251-0/+99
| | | | | | | | | | | | | | | | | These are needed for .ctors/.dtors and .jcr handling. The former needs all the function pointers to be called in the correct order from the .init/.fini section. The latter just needs to call a gcj specific function if it exists with a pointer to the start of the .jcr section. This is currently disabled until __dso_handle support is added. Reviewed by: emaste MFC after: 1 month Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17587 Notes: svn path=/head/; revision=339738
* GC these crt{begin,end}.c, which are unused since the last FreeBSD platformMarius Strobl2006-05-221-81/+0
| | | | | | | switched to those created from GCC's crtstuff.c 4 years ago. Notes: svn path=/head/; revision=158836
* GC code that moved to crtbrand.c.David E. O'Brien2002-01-281-4/+0
| | | | Notes: svn path=/head/; revision=89930
* Feh, it helps to include a file other than yourself... wonder howDavid E. O'Brien2001-10-271-1/+1
| | | | | | | | | GCC cpp liked that. Properly include the branding info. Notes: svn path=/head/; revision=85592
* * Bring back the guts of crt{i,n}.S. This allows C++ exceptions to workDavid E. O'Brien2000-10-281-18/+1
| | | | | | | | | | | | | | | | | | | | | | when using the egcs and gcc-devel ports, along with GCC built from stock public FSF sources. With out this change, FreeBSD will be removed from the list of systems GCC 3.0 must be evaluated on before release. With the effort some of us put into getting FreeBSD on this list, we should not turn this effort into a waste, else we might not be worth fighting for in the future. (note that Alpha and IA-64 versions of crt{i,n}.S are needed) * Switch from our own crt{begin,in} to those created from GCC's crtstuff.c. This will allow us to switch to DWARF2 exceptions in the future, along with staying in sync with any future GCC requirements. * Break out our ELF branding bits into a seperate file. Currently this is now included by our crt1.c files (since this functionality was part of our native crtbegin.c). Later crtbrand.o will be merged in the creation of crti.o. Notes: svn path=/head/; revision=67811
* This is step 1 in an effort to unify the start-up files for theJohn Polstra2000-05-191-7/+50
| | | | | | | | | | | | | | | | | | | | various architectures. Now all the work is done in crtbegin.c. It doesn't contain any assembly language code, so it should work fine on all architectures. (I have tested it on the i386 and the alpha.) The old assembly language files crt[in].S are now empty shells that generate no code or data. They should not be removed any time soon, because the various versions of gcc in src and ports expect them to exist. Next I will move crtbegin.c into a new common machine-independent directory, and adjust the i386-elf Makefile to use that version. After that I will adjust the alpha Makefile to use the common version too. Requested by: obrien Notes: svn path=/head/; revision=60698
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50476
* Reverse the order of processing object files within an executable orJohn Polstra1999-03-131-3/+3
| | | | | | | | | | | | | | | | shared library when invoking global constructors and destructors. For constructors, the object files used to be processed from first to last; now they're done from last to first. (Destructors are done in the opposite order, as required by the C++ standard.) This makes us consistent with standard gcc and egcs compilers. It also eliminates ordering differences between dynamic and static executables. Bump the value of __FreeBSD_version to 400002 to reflect this change. Notes: svn path=/head/; revision=44699
* Move the code for the ".init" and ".fini" sections outside of aJohn Polstra1999-03-121-10/+8
| | | | | | | | | | | | C function so the compiler won't try to emit line numbers for it with "-g", breaking the build. This has the nice side-effect of making crtbegin.o and crtbeginS.o a little bit smaller. Remove "-Wno-unused" from the Makefile. Replace it with "__unused" on particular function and variable declarations. Notes: svn path=/head/; revision=44691
* Import C startup files for ELF support.John Polstra1998-03-071-0/+61
Submitted by: John Polstra <jdp@polstra.com> Notes: svn path=/cvs2svn/branches/JDP/; revision=34198