From c7361734423c6c4ab03963fe6c71c52f32235dc9 Mon Sep 17 00:00:00 2001 From: jb Date: Tue, 10 Mar 1998 06:47:14 +0000 Subject: 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. --- contrib/gcc/config/alpha/freebsd-elf.h | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'contrib/gcc') diff --git a/contrib/gcc/config/alpha/freebsd-elf.h b/contrib/gcc/config/alpha/freebsd-elf.h index d57f963..aa4b6e8 100644 --- a/contrib/gcc/config/alpha/freebsd-elf.h +++ b/contrib/gcc/config/alpha/freebsd-elf.h @@ -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++ -- cgit v1.1