* [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
* [PATCH] firmware: Prevent _start from not being at the beginning
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
0 siblings, 1 reply; 3+ messages in thread
From: Andreas Schwab @ 2024-03-05 10:43 UTC (permalink / raw)
To: opensbi
On M?r 05 2024, Xiang W wrote:
> 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.
That should not be a problem. Since it is passed as the first object
file to the linker it is guaranteed to be placed first.
--
Andreas Schwab, SUSE Labs, schwab at suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] firmware: Prevent _start from not being at the beginning
2024-03-05 10:43 ` Andreas Schwab
@ 2024-03-05 12:27 ` Xiang W
0 siblings, 0 replies; 3+ messages in thread
From: Xiang W @ 2024-03-05 12:27 UTC (permalink / raw)
To: opensbi
? 2024-03-05???? 11:43 +0100?Andreas Schwab???
> On M?r 05 2024, Xiang W wrote:
>
> > 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.
>
> That should not be a problem.? Since it is passed as the first object
> file to the linker it is guaranteed to be placed first.
>
Thank you for your reply
Is this the default behavior of the linker or is there any standard
provision? If there are no standards, modifications will still be?
needed.
Regards,
Xiang W
^ permalink raw reply [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.