From d386bce90d4bb8249aa2f1a4ab5078b171c6c957 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 18 Dec 2017 13:54:08 -0600 Subject: pc386: Simplify bsp_specs If this has any issues, check that the change in linking the 16-bit startup code in Makefile.am generates the same code. This was odd code and didn't need the RTEMS linkcmds anyway. Updates #3520. --- c/src/lib/libbsp/i386/pc386/Makefile.am | 2 +- c/src/lib/libbsp/i386/pc386/bsp_specs | 6 +----- c/src/lib/libbsp/i386/pc386/startup/linkcmds | 3 ++- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/c/src/lib/libbsp/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am index fa15c06e3e..e30411e4cc 100644 --- a/c/src/lib/libbsp/i386/pc386/Makefile.am +++ b/c/src/lib/libbsp/i386/pc386/Makefile.am @@ -52,7 +52,7 @@ start16.$(OBJEXT): start/start16.S $(CPPASCOMPILE) $(AM_CPPFLAGS) -DHEADERADDR=$(HEADERADDR) -o $@ -c $< start16-elf32.$(OBJEXT): start16.$(OBJEXT) - $(LD) -N -T $(top_srcdir)/startup/linkcmds -Ttext $(START16ADDR) -e start16 -nostdlib \ + $(LD) -N -Ttext $(START16ADDR) -e start16 -nostdlib \ --oformat=elf32-i386 \ -o $@ $< diff --git a/c/src/lib/libbsp/i386/pc386/bsp_specs b/c/src/lib/libbsp/i386/pc386/bsp_specs index 5154de8c55..87638cc027 100644 --- a/c/src/lib/libbsp/i386/pc386/bsp_specs +++ b/c/src/lib/libbsp/i386/pc386/bsp_specs @@ -1,13 +1,9 @@ %rename endfile old_endfile %rename startfile old_startfile -%rename link old_link *startfile: %{!qrtems: %(old_startfile)} \ -%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e start}} - -*link: -%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N} +%{!nostdlib: %{qrtems: crti.o%s crtbegin.o%s}} *endfile: %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s crtn.o%s} diff --git a/c/src/lib/libbsp/i386/pc386/startup/linkcmds b/c/src/lib/libbsp/i386/pc386/startup/linkcmds index bb829224d2..5fc3444c9e 100644 --- a/c/src/lib/libbsp/i386/pc386/startup/linkcmds +++ b/c/src/lib/libbsp/i386/pc386/startup/linkcmds @@ -13,8 +13,9 @@ OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386") OUTPUT_ARCH(i386) -ENTRY(_start) */ +STARTUP(start.o) +ENTRY(start) HeapSize = DEFINED(HeapSize) ? HeapSize : DEFINED(_HeapSize) ? _HeapSize : 0x0; RamSize = DEFINED(RamSize) ? RamSize : -- cgit v1.2.3