From 16286081e12f8556b5a2fe2d07064c2899e01f33 Mon Sep 17 00:00:00 2001 From: Ville Juven Date: Fri, 10 Jun 2022 13:35:50 +0300 Subject: [PATCH] risc-v/mpfs: Move the entry point to .start section Remove the object linkage and use an explicit .start section --- arch/risc-v/src/mpfs/mpfs_head.S | 2 +- arch/risc-v/src/mpfs/mpfs_shead.S | 2 +- boards/risc-v/mpfs/icicle/scripts/kernel-space.ld | 4 ++-- boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script | 4 ++-- boards/risc-v/mpfs/icicle/scripts/ld-envm.script | 4 ++-- boards/risc-v/mpfs/icicle/scripts/ld-ihc.script | 4 ++-- boards/risc-v/mpfs/icicle/scripts/ld-kernel.script | 4 ++-- boards/risc-v/mpfs/icicle/scripts/ld.script | 4 ++-- boards/risc-v/mpfs/m100pfsevp/scripts/ld-envm.script | 4 ++-- boards/risc-v/mpfs/m100pfsevp/scripts/ld.script | 4 ++-- 10 files changed, 18 insertions(+), 18 deletions(-) diff --git a/arch/risc-v/src/mpfs/mpfs_head.S b/arch/risc-v/src/mpfs/mpfs_head.S index 4f19b8e94b..4e03261110 100755 --- a/arch/risc-v/src/mpfs/mpfs_head.S +++ b/arch/risc-v/src/mpfs/mpfs_head.S @@ -38,7 +38,7 @@ .extern __trap_vec - .section .text + .section .start .global __start __start: diff --git a/arch/risc-v/src/mpfs/mpfs_shead.S b/arch/risc-v/src/mpfs/mpfs_shead.S index 200c6d654a..c42c68310c 100644 --- a/arch/risc-v/src/mpfs/mpfs_shead.S +++ b/arch/risc-v/src/mpfs/mpfs_shead.S @@ -38,7 +38,7 @@ .extern __trap_vec - .section .text + .section .start .global __start /**************************************************************************** diff --git a/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld b/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld index 197518d466..ae416b79e9 100755 --- a/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld +++ b/boards/risc-v/mpfs/icicle/scripts/kernel-space.ld @@ -40,12 +40,12 @@ __ksram_size = LENGTH(ksram); __ksram_end = ORIGIN(ksram) + LENGTH(ksram); ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .text : { _stext = ABSOLUTE(.); - *(.vectors) + *(.start .start.*) *(.text .text.*) *(.fixup) *(.gnu.warning) diff --git a/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script b/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script index 8bbbbe628a..678279fb7a 100755 --- a/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script +++ b/boards/risc-v/mpfs/icicle/scripts/ld-envm-opensbi.script @@ -29,7 +29,7 @@ MEMORY OUTPUT_ARCH("riscv") ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .text.sbi : { @@ -59,7 +59,7 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - mpfs_head.o + *(.start .start.*) *(.text .text.*) *(.f-ixup) *(.gnu.warning) diff --git a/boards/risc-v/mpfs/icicle/scripts/ld-envm.script b/boards/risc-v/mpfs/icicle/scripts/ld-envm.script index aec2d8a368..ceaf236ef4 100755 --- a/boards/risc-v/mpfs/icicle/scripts/ld-envm.script +++ b/boards/risc-v/mpfs/icicle/scripts/ld-envm.script @@ -32,12 +32,12 @@ __ksram_size = LENGTH(lim); __ksram_end = ORIGIN(lim) + LENGTH(lim); ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .text : { _stext = ABSOLUTE(.); - mpfs_head.o + *(.start .start.*) *(.text .text.*) *(.fixup) *(.gnu.warning) diff --git a/boards/risc-v/mpfs/icicle/scripts/ld-ihc.script b/boards/risc-v/mpfs/icicle/scripts/ld-ihc.script index 52a0f6c55c..25f33257b5 100755 --- a/boards/risc-v/mpfs/icicle/scripts/ld-ihc.script +++ b/boards/risc-v/mpfs/icicle/scripts/ld-ihc.script @@ -33,7 +33,7 @@ __ksram_size = LENGTH(sram); __ksram_end = ORIGIN(sram) + LENGTH(sram); ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .filler_area : ALIGN(0x1000) @@ -61,7 +61,7 @@ SECTIONS .text : { _stext = ABSOLUTE(.); - mpfs_head.o + *(.start .start.*) *(.text .text.*) *(.fixup) *(.gnu.warning) diff --git a/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script b/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script index 910bc255c1..ee026a31eb 100755 --- a/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script +++ b/boards/risc-v/mpfs/icicle/scripts/ld-kernel.script @@ -46,12 +46,12 @@ __pgheap_start = ORIGIN(pgram); __pgheap_size = LENGTH(pgram); ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .text : { _stext = ABSOLUTE(.); - *(.vectors) + *(.start .start.*) *(.text .text.*) *(.fixup) *(.gnu.warning) diff --git a/boards/risc-v/mpfs/icicle/scripts/ld.script b/boards/risc-v/mpfs/icicle/scripts/ld.script index 6933cb6897..9003979074 100755 --- a/boards/risc-v/mpfs/icicle/scripts/ld.script +++ b/boards/risc-v/mpfs/icicle/scripts/ld.script @@ -31,12 +31,12 @@ __ksram_size = LENGTH(sram); __ksram_end = ORIGIN(sram) + LENGTH(sram); ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .text : { _stext = ABSOLUTE(.); - mpfs_head.o + *(.start .start.*) *(.text .text.*) *(.fixup) *(.gnu.warning) diff --git a/boards/risc-v/mpfs/m100pfsevp/scripts/ld-envm.script b/boards/risc-v/mpfs/m100pfsevp/scripts/ld-envm.script index feae94ba1c..4b256f09f1 100755 --- a/boards/risc-v/mpfs/m100pfsevp/scripts/ld-envm.script +++ b/boards/risc-v/mpfs/m100pfsevp/scripts/ld-envm.script @@ -28,12 +28,12 @@ MEMORY OUTPUT_ARCH("riscv") ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .text : { _stext = ABSOLUTE(.); - mpfs_head.o + *(.start .start.*) *(.text .text.*) *(.fixup) *(.gnu.warning) diff --git a/boards/risc-v/mpfs/m100pfsevp/scripts/ld.script b/boards/risc-v/mpfs/m100pfsevp/scripts/ld.script index 720757c571..09650571a7 100755 --- a/boards/risc-v/mpfs/m100pfsevp/scripts/ld.script +++ b/boards/risc-v/mpfs/m100pfsevp/scripts/ld.script @@ -27,12 +27,12 @@ MEMORY OUTPUT_ARCH("riscv") ENTRY(_stext) -EXTERN(_vectors) +EXTERN(__start) SECTIONS { .text : { _stext = ABSOLUTE(.); - mpfs_head.o + *(.start .start.*) *(.text .text.*) *(.fixup) *(.gnu.warning)