[PATCH 07/29] pc386: Simplify bsp_specs

Joel Sherrill joel at rtems.org
Tue Dec 19 00:01:03 UTC 2017


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 fa15c06..e30411e 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 5154de8..87638cc 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 bb82922..5fc3444 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    : 
-- 
1.8.3.1




More information about the devel mailing list