Commit Graph

18 Commits

Author SHA1 Message Date
Doug Rabson
4a5a97e625 Back out the call to _init_tls() - something is broken there and it
prevents all static binaries from running.
2004-08-21 08:22:00 +00:00
Doug Rabson
ccd13c49b5 Add support for TLS in statically linked programs. 2004-08-15 16:18:52 +00:00
Mark Murray
818c8b696b make these more useful for lint(1). Minor diff-reductions while I'm
about it.
2003-01-26 23:14:47 +00:00
Mark Murray
828191256b The main reason for this is to reduce diffs between all the crt1.c's.
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
2002-07-16 12:28:50 +00:00
David E. O'Brien
ad275bd760 Prototype _start.
Submitted by:	markm

Mark some _start formal parameters __unused.
2002-06-25 18:01:12 +00:00
David E. O'Brien
88727b7db9 Style nit and modernize SCM ID. 2002-04-13 21:54:09 +00:00
Mark Murray
4cd0119367 Do not use __progname directly (except in [gs]etprogname(3)).
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.
2002-03-29 22:43:43 +00:00
David E. O'Brien
7424ae80fc Fix nit in copyright. 2001-10-26 06:45:10 +00:00
David E. O'Brien
7c6e689224 Add rcsid's. 2001-01-04 10:37:25 +00:00
David E. O'Brien
ae7c8a2bb8 * Bring back the guts of crt{i,n}.S. This allows C++ exceptions to work
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.
2000-10-28 21:26:48 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
Hidetoshi Shimokawa
480d03cbdd Enable gcrt1.o. 1999-07-16 06:59:27 +00:00
John Polstra
4e54ad63db Remove some left-over stuff from NetBSD that we don't need. This
eliminates the need to include the dynamic linker's private header
file, as well as two other headers from <sys>.
1999-04-24 02:07:17 +00:00
Hidetoshi Shimokawa
49837d6cd0 Initialize __progname by argv[0] before striping leading path,
otherwise we always get empty name.
1999-01-19 06:58:31 +00:00
Steve Price
0997d762cf Strip the leading path from __progname.
Ok'd by:	jdp
1999-01-07 20:18:18 +00:00
John Birrell
34c91739be Remove the bootstrap hack that prevented the use of the rtld. 1998-08-20 21:37:22 +00:00
John Birrell
1901906aa6 Sharing the crt sources with i386-elf wasn't too successful. The crti
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.
1998-03-11 20:36:11 +00:00
John Birrell
fbb2bc058d Import a sanitized version of jdp's crt1.c from i386-elf. I have removed
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.
1998-03-10 06:56:16 +00:00