summaryrefslogtreecommitdiff
path: root/lib/csu
Commit message (Collapse)AuthorAgeFilesLines
* MFC: Align stack for SSE.Doug Rabson2005-05-263-0/+7
| | | | Notes: svn path=/stable/5/; revision=146638
* MFC:Tom Rhodes2005-01-183-527/+0
| | | | | | | Remnant code (broken, unhooked) from a.out which I missed. Notes: svn path=/stable/5/; revision=140404
* MFC v1.17: Back out call to _init_tls() until it can be fixed. ThisKen Smith2004-08-211-2/+0
| | | | | | | | | | is currently causing all static executables to fail. Work done by: dfr Approved by: re (rwatson) Notes: svn path=/stable/5/; revision=134120
* MFC rev 1.4: unbreak the startup code by restoring a clobbered GP.Marcel Moolenaar2004-08-191-1/+1
| | | | | | | Approved by: re (blanket) Notes: svn path=/stable/5/; revision=133997
* This commit was manufactured by cvs2svn to create branch 'RELENG_5'.cvs2svn2004-08-188-412/+0
| | | | Notes: svn path=/stable/5/; revision=133968
* Add support for TLS in statically linked programs.Doug Rabson2004-08-157-0/+17
| | | | Notes: svn path=/head/; revision=133754
* C runtime support for FreeBSD/arm.Olivier Houchard2004-05-144-0/+169
| | | | Notes: svn path=/head/; revision=129205
* Adjust stack alignment so that when the 'call xxx' functions arePeter Wemm2004-03-212-0/+4
| | | | | | | | gathered into the middle of the _init and _fini sections, they get executed with their expected stack alignment. Notes: svn path=/head/; revision=127252
* The <bsd.files.mk> API seems the best to use here.Ruslan Ermilov2004-01-201-11/+7
| | | | Notes: svn path=/head/; revision=124752
* Explicitly specify an alignment for abitag. Without it, gcc specifies aPeter Wemm2003-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | section alignnment of 16 bytes for amd64 and this breaks file(1). Before: ./cp: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), for \ FreeBSD 127.7.9, statically linked, stripped after: ^^^^^^^ ./ls: ELF 64-bit LSB executable, AMD x86-64, version 1 (FreeBSD), for \ FreeBSD 5.0.1, dynamically linked (uses shared libs), stripped The reason for this is that the NOTE sections are not contiguous internally. If the note section has an alignment of 16, then anything that looks for the data is supposed to round up the payload start to the next multiple of the alignment. But FreeBSD/amd64 broke because the structure is declared as a single structure, not a (header,payload) group, where the payload had an explicit alignment roundup. The alternative is to change things like file(1) to ignore the ELF payload alignment rules for the PT_NOTE section only for FreeBSD. Notes: svn path=/head/; revision=121160
* Fix typo: Passing the first argument to exit() in out2 does not work.Marcel Moolenaar2003-07-151-1/+1
| | | | | | | Trust me. Notes: svn path=/head/; revision=117606
* _start() needed to be written in assembly. See crt1.S.Marcel Moolenaar2003-07-141-124/+0
| | | | Notes: svn path=/head/; revision=117537
* Rewite _start(). We cannot use a C function due to the fact that weMarcel Moolenaar2003-07-132-2/+193
| | | | | | | | | | | | | | | | | | | | don't call it according to the runtime specification and especially WRT to gp this can cause trouble. The gcc 3.3.1 import broke the ia64 runtime because the compiler saved gp prior to us being able to set it properly. Restoring gp after the calls would then invalidate gp and cause segmentation faults later on. By rewriting _start() as an assembly function, we also avoided even more gcc dependences, by trying to use gcc specific features to work around the problem. This version of _start() does not reference _DYNAMIC. We register the cleanup function when it's a non-NULL pointer. The kernel will always pass a NULL pointer and dynamic linkers may pass a non-NULL pointer. The machine independent code to set __progname now unfortunately is written in assembly. So be it. Notes: svn path=/head/; revision=117531
* MFi386: revision 1.19.Ruslan Ermilov2003-06-301-3/+1
| | | | Notes: svn path=/head/; revision=117074
* Removed garbage:Bruce Evans2003-06-041-3/+1
| | | | | | | | | | - -elf in CFLAGS had no effect except to reduce portability. - -elf in LDFLAGS had even less effect, since LDFLAGS is not used. - -Wall in CFLAGS had no effect except to reduce portability and break overriding of WARNS, since the setting of WARNS implies -Wall. Notes: svn path=/head/; revision=115826
* This is now Gcc 3.3 WARNS 6 clean.David E. O'Brien2003-05-041-0/+1
| | | | Notes: svn path=/head/; revision=114667
* Set abitag __unused.David E. O'Brien2003-05-041-3/+4
| | | | Notes: svn path=/head/; revision=114666
* Update for AMD64. repocopied from i386-elf/crt1.c. Deal with regparmPeter Wemm2003-04-301-20/+5
| | | | | | | | argument passing rather than stack based args. The kernel passes the base of the argument/env vector in %rdi (arg1). Notes: svn path=/head/; revision=114319
* Very minor EOL whitespace diff-reducer.Mark Murray2003-01-261-1/+1
| | | | Notes: svn path=/head/; revision=109908
* Missed a bit of cleanup.Mark Murray2003-01-261-2/+0
| | | | Notes: svn path=/head/; revision=109907
* make these more useful for lint(1). Minor diff-reductions while I'mMark Murray2003-01-266-1/+7
| | | | | | | about it. Notes: svn path=/head/; revision=109905
* Remove the get_term() function. It pretty much can't work forMark Murray2003-01-261-36/+7
| | | | | | | | | | | FreeBSD, and makes ugly diffs with the other crt1.c's. Leave behind a comment (words supplied by Thomas Moestl) that explain the issue. OK'ed by: tmm Notes: svn path=/head/; revision=109903
* Backed out previous commit (alignment suitable for RELENG_4) as plannedBruce Evans2002-12-012-66/+0
| | | | | | | | | | | since it has been MFC'ed. See the log message for the previous commit for more details. The alignment bug in gcc-3 has not been fixed, but it is not very serious and the previous commit just moved it (as intended). Approved by: re (murray) Notes: svn path=/head/; revision=107460
* Align the stack suitably for the version of gcc in FreeBSD-4 (providedBruce Evans2002-09-292-0/+66
| | | | | | | | | | | | | | | | | | | | | | -fomit-frame-pointer is not used). This is mostly moot for -current because gcc-3 does the alignment (slightly incorrectly) in main(). This patch is intended for easy MFC'ing and should be backed out in -current soon since it causes compiler warnings and better fixes are possible in -current. The best fix is to do nothing here and wait for gcc to do stack alignment right. gcc-3 aligns the stack in main(), but does it too late for main()'s local variables and too late for anything called before main(). A misaligned stack is now more than an efficiency problem, since some SSE instructions in some or all (hardware) implementations trap on misaligned operands even if alignment checking is not enabled. PR: 41528: Submitted by: NIIMI Satoshi <sa2c@sa2c.net> (original version) MFC after: 3 days Notes: svn path=/head/; revision=104143
* Remove a prototype for a function that is no longer called.Mark Murray2002-09-201-1/+0
| | | | Notes: svn path=/head/; revision=103721
* Don't need to install the signal trampoline here anymore.Jake Burkholder2002-09-031-1/+0
| | | | Notes: svn path=/head/; revision=102900
* Drop support for COPY, -c has been the default mode of install(1)Ruslan Ermilov2002-07-297-7/+7
| | | | | | | | | for a long time now. Approved by: bde Notes: svn path=/head/; revision=100872
* The main reason for this is to reduce diffs between all the crt1.c's.Mark Murray2002-07-166-91/+140
| | | | | | | | | | | | | | | | | | | | | | Assembler macros are tidied up and made as similar as sanely possible. The macros are translated into C (__inline static) functions for lint. Declaration orders are made the same. Declarations are all ISOfied and tidied up. Comment contents have gratuitous diffs removed. The net result is a bunch of crt1.c's that are 90% the same. It may be possible to now encapsulate the differences in one MD header, and have only one MI crt1.c file (although the macros to do this may be ugly). Helpful comments by: obrien, bde Alpha tested by: des i386-elf tested by: markm Notes: svn path=/head/; revision=100167
* Whitespace diffs only; this brings this file into the same whitespaceMark Murray2002-07-032-52/+54
| | | | | | | | | convention as src/lib/csu/*/crt1.c. This will make the follow up diffs easier to see and extract. Notes: svn path=/head/; revision=99354
* WARNS=6'ify.David E. O'Brien2002-06-251-7/+5
| | | | | | | Style nits. Notes: svn path=/head/; revision=98817
* Prototype _start.David E. O'Brien2002-06-251-2/+4
| | | | | | | | | Submitted by: markm Mark some _start formal parameters __unused. Notes: svn path=/head/; revision=98816
* Use .rodata section for $FreeBSD$.David E. O'Brien2002-05-156-12/+20
| | | | Notes: svn path=/head/; revision=96632
* Fixed CLEANFILES after bsd.lib.mk sweep.Ruslan Ermilov2002-05-136-0/+12
| | | | Notes: svn path=/head/; revision=96530
* SOBJS are not used here for a long time, and were justRuslan Ermilov2002-05-136-24/+12
| | | | | | | pessimising the `install'. Notes: svn path=/head/; revision=96516
* Major cleanup of bsd.lib.mk.Ruslan Ermilov2002-05-136-27/+0
| | | | | | | | | | Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB. INTERNALLIB now means to build static library only and don't install anything. Added a NOINSTALLLIB knob for libpam/modules. To not build any library at all, just do not set LIB. Notes: svn path=/head/; revision=96512
* Revert the last change. The corresponding bsd.lib.mk changes wereRuslan Ermilov2002-05-126-6/+25
| | | | | | | already backed out. Notes: svn path=/head/; revision=96463
* Use the simpler NOMAN rather than NOMAN, NOPIC, NOPROFILE, INTERNALLIB.David E. O'Brien2002-05-116-25/+6
| | | | Notes: svn path=/head/; revision=96411
* Use the compiler's crt{begin,end}.David E. O'Brien2002-05-101-2/+1
| | | | Notes: svn path=/head/; revision=96313
* Fix the copyright dates.David E. O'Brien2002-05-071-1/+1
| | | | Notes: svn path=/head/; revision=96171
* Install the libc signal trampoline on startup.Jake Burkholder2002-04-291-0/+2
| | | | Notes: svn path=/head/; revision=95751
* Removed "-fkeep-inline-functions" from CFLAGS, since it now has no effectBruce Evans2002-04-292-2/+2
| | | | | | | | | | | | | | | | except to generate spurious warnings about a system header <sys/param.h> having some inline functions (the bswap family). This backs out the main part of rev.1.5 (which was the only part left). The problem fixed by rev.1.5 of the Makefile went away in rev.1.5 of ../common/crtbegin.c when the references to do_ctors() and do_dtors() in the latter were moved from inline asm to C code. This leaves the problem that implementation details cause warnings. Discussed with: jdp Notes: svn path=/head/; revision=95721
* Style nit and modernize SCM ID.David E. O'Brien2002-04-131-8/+2
| | | | Notes: svn path=/head/; revision=94613
* For now we are using our old crt{begin,end}.David E. O'Brien2002-04-081-3/+3
| | | | Notes: svn path=/head/; revision=94230
* Do not use __progname directly (except in [gs]etprogname(3)).Mark Murray2002-03-2914-24/+39
| | | | | | | | | 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. Notes: svn path=/head/; revision=93399
* Style nit.David E. O'Brien2002-03-231-3/+3
| | | | Notes: svn path=/head/; revision=93037
* Remove prototype, no other crt1.c has or needs it.David E. O'Brien2002-03-231-9/+6
| | | | Notes: svn path=/head/; revision=93036
* Remove __P() usage.David E. O'Brien2002-03-221-2/+2
| | | | Notes: svn path=/head/; revision=92938
* Remove __P() usage.David E. O'Brien2002-03-211-2/+2
| | | | Notes: svn path=/head/; revision=92915
* Revert part of rev 1.3 -- we need the calls to _init and _fini.David E. O'Brien2002-03-161-4/+0
| | | | Notes: svn path=/head/; revision=92447
* Sync with csu/alpha/Makefile: build crt{i,n}.o.David E. O'Brien2002-03-101-3/+2
| | | | | | | Leave crtbegin* to the compiler vendor. Notes: svn path=/head/; revision=92033