Commit Graph

9 Commits

Author SHA1 Message Date
Konstantin Belousov
88c23d858b Add section .note.GNU-stack for assembly files used by 386 and amd64. 2011-01-07 16:07:51 +00:00
Dimitry Andric
cbbcfbf8b7 Let all .c and .S files under lib/csu consistently use the __FBSDID()
macro for identification, instead of several different hand-rolled
variants (plain .ident, .ascii, etc).
2010-12-09 21:31:21 +00:00
Peter Wemm
c50be14baa Adjust stack alignment so that when the 'call xxx' functions are
gathered into the middle of the _init and _fini sections, they get
executed with their expected stack alignment.
2004-03-21 01:39:01 +00:00
David E. O'Brien
d03f581f32 Use .rodata section for $FreeBSD$. 2002-05-15 04:19:49 +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
John Polstra
f6d15b87f8 This is step 1 in an effort to unify the start-up files for the
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
2000-05-19 04:32:17 +00:00
David E. O'Brien
c815a20cb2 Change our ELF binary branding to something more acceptable to the Binutils
maintainers.

After we established our branding method of writing upto 8 characters of
the OS name into the ELF header in the padding; the Binutils maintainers
and/or SCO (as USL) decided that instead the ELF header should grow two new
fields -- EI_OSABI and EI_ABIVERSION.  Each of these are an 8-bit unsigned
integer.  SCO has assigned official values for the EI_OSABI field.  In
addition to this, the Binutils maintainers and NetBSD decided that a better
ELF branding method was to include ABI information in a ".note" ELF
section.

With this set of changes, we will now create ELF binaries branded using
both "official" methods.  Due to the complexity of adding a section to a
binary, binaries branded with ``brandelf'' will only brand using the
EI_OSABI method.  Also due to the complexity of pulling a section out of an
ELF file vs. poking around in the ELF header, our image activator only
looks at the EI_OSABI header field.

Note that a new kernel can still properly load old binaries except for
Linux static binaries branded in our old method.

  *
  * For a short period of time, ``ld'' will also brand ELF binaries
  * using our old method.  This is so people can still use kernel.old
  * with a new world.  This support will be removed before 5.0-RELEASE,
  * and may not last anywhere upto the actual release.  My expiration
  * time for this is about 6mo.
  *
2000-04-18 02:39:26 +00:00
Peter Wemm
7f3dea244c $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
John Polstra
966a88d986 Import C startup files for ELF support.
Submitted by:	John Polstra <jdp@polstra.com>
1998-03-07 20:27:11 +00:00