Change the LINK_SPEC to specify the same runtime loader as used on

i386-elf because that is what will be used for FreeBSD/Alpha.

Change the STARTFILE_SPEC to match the non-aout version of i386 so
that the csu files can be built in exactly the same way as i386-elf.
This means that FreeBSD/Alpha departs from NetBSD/Alpha which uses
crt0 and crtbegin/crtend. Since i386-aout uses crt0, I guess it was
decided that i386-elf should use crt1. i386-elf also references
crti and with this change, so does FreeBAS/Alpha.

I think it is important for FreeBSD to have a consistent implementation
across architectures and since ELF is quite compatible (ignoring
differences in 32 and 64 bits), gcc might as well be configured the
same.

Another change is that the entry symbol is _start, not __start as
in NetBSD.
This commit is contained in:
jb 1998-03-10 06:47:14 +00:00
parent e2f452734c
commit c736173442

View File

@ -41,25 +41,19 @@
%{shared:-shared} \
%{!shared: \
-dc -dp \
%{!nostdlib:%{!r*:%{!e*:-e __start}}} \
%{!nostdlib:%{!r*:%{!e*:-e _start}}} \
%{!static: \
%{rdynamic:-export-dynamic} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld.elf_so}} \
%{!dynamic-linker:-dynamic-linker /usr/libexec/ld-elf.so.1}} \
%{static:-static}}"
/* Provide a STARTFILE_SPEC appropriate for FreeBSD. Here we add
the crtbegin.o file (see crtstuff.c) which provides part of the
support for getting C++ file-scope static object constructed
before entering `main'. */
/* Provide a STARTFILE_SPEC for FreeBSD that is compatible with the
non-aout version used on i386. */
#undef STARTFILE_SPEC
#define STARTFILE_SPEC \
"%{!shared: \
%{pg:gcrt0.o%s} \
%{!pg: \
%{p:gcrt0.o%s} \
%{!p:crt0.o%s}}} \
%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
"%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
/* Provide a ENDFILE_SPEC appropriate for FreeBSD. Here we tack on
the file which provides part of the support for getting C++