summaryrefslogtreecommitdiff
path: root/libcpu
diff options
context:
space:
mode:
authorGUI <[email protected]>2025-07-08 14:10:04 +0800
committerGitHub <[email protected]>2025-07-08 14:10:04 +0800
commit3d72290b383de3b2ca974510021c1cab71a9dab0 (patch)
tree89310e4fee9adf0613a993dd82179c1ee27e6500 /libcpu
parent749d9cf84cb46083c1f1fef2ae1878afc58f710d (diff)
[aarch64]Fixup linker warning #10466
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/aarch64/link.lds.S11
1 files changed, 9 insertions, 2 deletions
diff --git a/libcpu/aarch64/link.lds.S b/libcpu/aarch64/link.lds.S
index 0fe8de7c76..a09842ca7d 100644
--- a/libcpu/aarch64/link.lds.S
+++ b/libcpu/aarch64/link.lds.S
@@ -20,6 +20,13 @@ OUTPUT_ARCH(aarch64)
#define ARCH_RAM_OFFSET 0
#endif
+PHDRS
+{
+ text PT_LOAD FLAGS(5); /* PF_R(4) | PF_X(1) = 0x5 (RX) */
+ data PT_LOAD FLAGS(6); /* PF_R(4) | PF_W(2) = 0x6 (RW) */
+ stack PT_LOAD FLAGS(6); /* PF_R | PF_W */
+}
+
SECTIONS
{
_text_offset = ARCH_TEXT_OFFSET;
@@ -89,7 +96,7 @@ SECTIONS
__usbh_class_info_end__ = .;
PROVIDE(__text_end = .);
- }
+ } :text
.eh_frame_hdr :
{
@@ -113,7 +120,7 @@ SECTIONS
*(.sdata)
*(.sdata.*)
*(.rel.local)
- }
+ } :data
. = ALIGN(8);
.ctors :