firmware: fix section types
authorMatt Waltz <matthewwaltzis@gmail.com>
Tue, 5 Dec 2023 15:13:44 +0000 (08:13 -0700)
committerAnup Patel <anup@brainfault.org>
Sat, 9 Dec 2023 08:56:58 +0000 (14:26 +0530)
These sections are only intended to hold data, and should not be executable.

Signed-off-by: Matt Waltz <matthewwaltzis@gmail.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
firmware/fw_dynamic.S
firmware/fw_jump.S
firmware/payloads/test_head.S

index 2b6019676c5cbc0b0c058610e361537d92ac7e50..7ff1c6a32b71655412fd22bfb1147b8187d7007d 100644 (file)
@@ -129,7 +129,7 @@ fw_options:
        REG_L   a0, (a0)
        ret
 
-       .section .entry, "ax", %progbits
+       .section .data
        .align 3
 _dynamic_next_arg1:
        RISCV_PTR 0x0
index 5b24f8b765a86984bee4549349bb393ac32633fd..ac74dc64389e6492ad8a0c93c33c60b4a0f7754f 100644 (file)
@@ -90,7 +90,7 @@ fw_options:
 #error "Must define FW_JUMP_ADDR"
 #endif
 
-       .section .entry, "ax", %progbits
+       .section .rodata
        .align 3
 _jump_addr:
        RISCV_PTR FW_JUMP_ADDR
index 4852f715f5da9b4b1443e5ea2b810dcbfd06806d..7a2ac1267520041d0a7124a9f1280257e284f21a 100644 (file)
@@ -78,7 +78,7 @@ _start_hang:
        wfi
        j       _start_hang
 
-       .section .entry, "ax", %progbits
+       .section .data
        .align  3
 _hart_lottery:
        RISCV_PTR       0