All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] firmware: Prevent _start from not being at the beginning
@ 2024-03-05 10:31 Xiang W
  2024-03-05 10:43 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Xiang W @ 2024-03-05 10:31 UTC (permalink / raw)
  To: opensbi

There are multiple .entry sections in opensbi, and _start may be put
after other .entry sections, which may cause problems. The patch fix
this issue.

Signed-off-by: Xiang W <wxjstz@126.com>
---
 firmware/fw_base.S   | 2 +-
 firmware/fw_base.ldS | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/firmware/fw_base.S b/firmware/fw_base.S
index 09894e6..7ade6a5 100644
--- a/firmware/fw_base.S
+++ b/firmware/fw_base.S
@@ -42,7 +42,7 @@
 999:
 .endm
 
-	.section .entry, "ax", %progbits
+	.section .entry0, "ax", %progbits
 	.align 3
 	.globl _start
 	.globl _start_warm
diff --git a/firmware/fw_base.ldS b/firmware/fw_base.ldS
index fb47984..c1dc743 100644
--- a/firmware/fw_base.ldS
+++ b/firmware/fw_base.ldS
@@ -18,6 +18,7 @@
 	.text :
  	{
 		PROVIDE(_text_start = .);
+		*(.entry0)
 		*(.entry)
 		*(.text)
 		. = ALIGN(8);
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-03-05 12:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 10:31 [PATCH] firmware: Prevent _start from not being at the beginning Xiang W
2024-03-05 10:43 ` Andreas Schwab
2024-03-05 12:27   ` Xiang W

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.