[PATCH 1/8] gen5200, gen83xx, gen83x, mpc55xxevb, psim, qoriq, t32mppc, tqm8xx, virtex: Simplify bsp_specs

Joel Sherrill joel at rtems.org
Wed Dec 20 21:20:41 UTC 2017


These BSPs all use shared/startup/linkcmds.base and thus needed to be
modified at the same time. Variations in the arguments were reflected
into the BSP specific portions of the linkcmds.

Updates #3520.
---
 c/src/lib/libbsp/powerpc/gen5200/bsp_specs                     | 6 +-----
 c/src/lib/libbsp/powerpc/gen83xx/bsp_specs                     | 7 +------
 c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds              | 2 ++
 c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc83xx      | 2 ++
 c/src/lib/libbsp/powerpc/mpc55xxevb/bsp_specs                  | 6 +-----
 c/src/lib/libbsp/powerpc/psim/bsp_specs                        | 7 +------
 c/src/lib/libbsp/powerpc/psim/startup/linkcmds                 | 2 ++
 c/src/lib/libbsp/powerpc/qoriq/bsp_specs                       | 6 +-----
 c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0   | 2 ++
 c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1   | 2 ++
 c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e500     | 2 ++
 c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e6500_32 | 2 ++
 c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base          | 1 +
 c/src/lib/libbsp/powerpc/t32mppc/bsp_specs                     | 5 +----
 c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc      | 2 ++
 c/src/lib/libbsp/powerpc/tqm8xx/bsp_specs                      | 6 +-----
 c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.base          | 2 ++
 c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.tqm8xx        | 2 ++
 c/src/lib/libbsp/powerpc/virtex/bsp_specs                      | 6 +-----
 c/src/lib/libbsp/powerpc/virtex/startup/linkcmds.in            | 2 ++
 20 files changed, 31 insertions(+), 41 deletions(-)

diff --git a/c/src/lib/libbsp/powerpc/gen5200/bsp_specs b/c/src/lib/libbsp/powerpc/gen5200/bsp_specs
index 6675d7b..2625609 100644
--- a/c/src/lib/libbsp/powerpc/gen5200/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/gen5200/bsp_specs
@@ -1,13 +1,9 @@
 %rename endfile old_endfile
 %rename startfile old_startfile
-%rename link old_link
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/bsp_specs b/c/src/lib/libbsp/powerpc/gen83xx/bsp_specs
index a105a01..a37ec28 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/gen83xx/bsp_specs
@@ -1,14 +1,9 @@
 %rename endfile old_endfile
 %rename startfile old_startfile
-%rename link old_link
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s -u __vectors}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors}
-
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds b/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds
index 9d7c4a8..094fdf5 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds
@@ -8,6 +8,8 @@
  * be able to compile against this BSP.
  */
 
+EXTERN (__vectors)
+
 MEMORY {
 	RAM : ORIGIN = 0x0, LENGTH = 128M
 	ROM : ORIGIN = 0xfe000000, LENGTH = 8M
diff --git a/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc83xx b/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc83xx
index 66430a8..4ddbcd6 100644
--- a/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc83xx
+++ b/c/src/lib/libbsp/powerpc/gen83xx/startup/linkcmds.mpc83xx
@@ -9,6 +9,8 @@ bsp_rom_end = bsp_rom_start + bsp_rom_size;
 IMMRBAR = 0xe0000000;
 mpc83xx = IMMRBAR;
 
+EXTERN (__vectors)
+
 MEMORY {
 	EMPTY : ORIGIN = 0x0, LENGTH = 0
 }
diff --git a/c/src/lib/libbsp/powerpc/mpc55xxevb/bsp_specs b/c/src/lib/libbsp/powerpc/mpc55xxevb/bsp_specs
index 6675d7b..2625609 100644
--- a/c/src/lib/libbsp/powerpc/mpc55xxevb/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/mpc55xxevb/bsp_specs
@@ -1,13 +1,9 @@
 %rename endfile old_endfile
 %rename startfile old_startfile
-%rename link old_link
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
diff --git a/c/src/lib/libbsp/powerpc/psim/bsp_specs b/c/src/lib/libbsp/powerpc/psim/bsp_specs
index c876261..2625609 100644
--- a/c/src/lib/libbsp/powerpc/psim/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/psim/bsp_specs
@@ -1,14 +1,9 @@
 %rename endfile old_endfile
 %rename startfile old_startfile
-%rename link old_link
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s \
-    start.o%s -e _start -u __vectors}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dp -Bstatic}
diff --git a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
index 9c0f92a..ba9319c 100644
--- a/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
+++ b/c/src/lib/libbsp/powerpc/psim/startup/linkcmds
@@ -7,6 +7,8 @@
  *  http://www.rtems.org/license/LICENSE.
  */
 
+EXTERN (__vectors)
+
 MEMORY {
 	RAM       : ORIGIN = 0, LENGTH = 16M
 	EMPTY     : ORIGIN = 0x0, LENGTH = 0
diff --git a/c/src/lib/libbsp/powerpc/qoriq/bsp_specs b/c/src/lib/libbsp/powerpc/qoriq/bsp_specs
index 6e5bb08..001c45b 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/qoriq/bsp_specs
@@ -1,13 +1,9 @@
 %rename endfile old_endfile
 %rename startfile old_startfile
-%rename link old_link
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s rtems_crtn.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors %(link_os)}
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0 b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0
index b27c10f..80ae393 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_0
@@ -4,6 +4,8 @@
  * @brief Memory map for QorIQ Core 0.
  */
 
+EXTERN (__vectors)
+
 MEMORY {
 	LOW : ORIGIN = 0x4000, LENGTH = 16M - 16k
 	HIGH : ORIGIN = 0x1000000, LENGTH = 32M
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1 b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1
index 21a632b..ecb601b 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_core_1
@@ -4,6 +4,8 @@
  * @brief Memory map for QorIQ Core 1.
  */
 
+EXTERN (__vectors)
+
 MEMORY {
 	RAM : ORIGIN = 0x4000000, LENGTH = 64M
 	EMPTY : ORIGIN = 0x0, LENGTH = 0
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e500 b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e500
index 9d1fed2..b727aef 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e500
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e500
@@ -4,6 +4,8 @@
  * Memory map for P1020RDB.
  */
 
+EXTERN (__vectors)
+
 MEMORY {
 	LOW : ORIGIN = 0x4000, LENGTH = 16M - 16k
 	HIGH : ORIGIN = 0x1000000, LENGTH = 512M - 16M
diff --git a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e6500_32 b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e6500_32
index d143369..900147c 100644
--- a/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e6500_32
+++ b/c/src/lib/libbsp/powerpc/qoriq/startup/linkcmds.qoriq_e6500_32
@@ -4,6 +4,8 @@
  * Memory map for e6500 core based QorIQ chips, e.g. T2080, T4240.
  */
 
+EXTERN (__vectors)
+
 MEMORY {
 	LOW     : ORIGIN = 0x00004000, LENGTH = 16M - 16k
 	NOCACHE : ORIGIN = 0x01000000, LENGTH = 48M
diff --git a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
index a9b0c24..2005917 100644
--- a/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
+++ b/c/src/lib/libbsp/powerpc/shared/startup/linkcmds.base
@@ -21,6 +21,7 @@
  */
 
 ENTRY (_start)
+STARTUP (start.o)
 
 /*
  * Global symbols that may be defined externally
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/bsp_specs b/c/src/lib/libbsp/powerpc/t32mppc/bsp_specs
index 92f6c58..f8bbffb 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/t32mppc/bsp_specs
@@ -4,11 +4,8 @@
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s  crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s  crtbegin.o%s}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
 
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -u __vectors -N}
-
diff --git a/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc b/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc
index 165412f..02367f5 100644
--- a/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc
+++ b/c/src/lib/libbsp/powerpc/t32mppc/startup/linkcmds.t32mppc
@@ -1,3 +1,5 @@
+EXTERN (__vectors)
+
 MEMORY {
 	RAM : ORIGIN = 0x0, LENGTH = 128M
 	EMPTY : ORIGIN = 0x0, LENGTH = 0
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/bsp_specs b/c/src/lib/libbsp/powerpc/tqm8xx/bsp_specs
index 44f36ad..b5cd676 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/bsp_specs
@@ -1,13 +1,9 @@
 %rename endfile old_endfile
 %rename startfile old_startfile
-%rename link old_link
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s start.o%s -u __vectors}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s crtbegin.o%s}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn%O%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N}
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.base b/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.base
index 6e473c5..3ad73f2 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.base
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.base
@@ -7,6 +7,8 @@
 OUTPUT_FORMAT ("elf32-powerpc", "elf32-powerpc", "elf32-powerpc")
 OUTPUT_ARCH (powerpc)
 ENTRY (start)
+STARTUP (start.o)
+EXTERN (__vectors)
 
 bsp_ram_start = ORIGIN (RAM);
 bsp_ram_end = ORIGIN (RAM) + LENGTH (RAM);
diff --git a/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.tqm8xx b/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.tqm8xx
index d5668b6..a830b68 100644
--- a/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.tqm8xx
+++ b/c/src/lib/libbsp/powerpc/tqm8xx/startup/linkcmds.tqm8xx
@@ -4,6 +4,8 @@
  * TQM8xx
  */
 
+EXTERN (__vectors)
+
 TopRamReserved = DEFINED(TopRamReserved) ? TopRamReserved : 0;	
 MEMORY {
 	RAM   : ORIGIN = 0x0, LENGTH = 128M
diff --git a/c/src/lib/libbsp/powerpc/virtex/bsp_specs b/c/src/lib/libbsp/powerpc/virtex/bsp_specs
index bfa43f3..6cb546f 100644
--- a/c/src/lib/libbsp/powerpc/virtex/bsp_specs
+++ b/c/src/lib/libbsp/powerpc/virtex/bsp_specs
@@ -1,13 +1,9 @@
 %rename endfile old_endfile
 %rename startfile old_startfile
-%rename link old_link
 
 *startfile:
 %{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s  crtbegin.o%s start.o%s}}
+%{!nostdlib: %{qrtems: ecrti%O%s rtems_crti%O%s  crtbegin.o%s}}
 
 *endfile:
 %{!qrtems: %(old_endfile)} %{qrtems: crtend.o%s ecrtn.o%s}
-
-*link:
-%{!qrtems: %(old_link)} %{qrtems: -dc -dp -N -u __vectors}
diff --git a/c/src/lib/libbsp/powerpc/virtex/startup/linkcmds.in b/c/src/lib/libbsp/powerpc/virtex/startup/linkcmds.in
index 0de4cad..13f9217 100644
--- a/c/src/lib/libbsp/powerpc/virtex/startup/linkcmds.in
+++ b/c/src/lib/libbsp/powerpc/virtex/startup/linkcmds.in
@@ -1,3 +1,5 @@
+EXTERN (__vectors)
+
 MEMORY {
 	RAM : ORIGIN = @VIRTEX_RAM_ORIGIN@, LENGTH = @VIRTEX_RAM_LENGTH@
 	FAST_RAM : ORIGIN = @VIRTEX_FAST_RAM_ORIGIN@, LENGTH = @VIRTEX_FAST_RAM_LENGTH@
-- 
1.8.3.1




More information about the devel mailing list