aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox/cpu
diff options
context:
space:
mode:
authorAndrew Scull2022-05-30 10:00:03 +0000
committerTom Rini2022-06-23 12:58:18 -0400
commit0648b132696532c96c3656876c5b12ac336e1b27 (patch)
tree487bbffca17b31ba71547ff5da66af54755485d4 /arch/sandbox/cpu
parentaac53d3d96a236c1e62f250ed7ffa8cf9b0e44a6 (diff)
sandbox: Rename getopt sections
Rename the sections used for defining sandbox command line options so that they don't start with a '.'. ELF says that sections starting with a '.' are reserved for system use, but the sandbox runs as a normal user process so should be using user sections instead. Clang's ASAN adds redzones to non-user sections and the extra padding meant that the list of options was being corrupted. Naming the sections as user sections avoids this issue as clang handles them as we intended. Signed-off-by: Andrew Scull <ascull@google.com>
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r--arch/sandbox/cpu/u-boot-spl.lds6
-rw-r--r--arch/sandbox/cpu/u-boot.lds6
2 files changed, 6 insertions, 6 deletions
diff --git a/arch/sandbox/cpu/u-boot-spl.lds b/arch/sandbox/cpu/u-boot-spl.lds
index 206e265e74b..6b300bcc930 100644
--- a/arch/sandbox/cpu/u-boot-spl.lds
+++ b/arch/sandbox/cpu/u-boot-spl.lds
@@ -22,9 +22,9 @@ SECTIONS
}
_u_boot_sandbox_getopt : {
- *(.u_boot_sandbox_getopt_start)
- KEEP(*(.u_boot_sandbox_getopt))
- *(.u_boot_sandbox_getopt_end)
+ *(_u_boot_sandbox_getopt_start)
+ KEEP(*(_u_boot_sandbox_getopt))
+ *(_u_boot_sandbox_getopt_end)
}
}
diff --git a/arch/sandbox/cpu/u-boot.lds b/arch/sandbox/cpu/u-boot.lds
index d2cb12fc298..1f89a3329e1 100644
--- a/arch/sandbox/cpu/u-boot.lds
+++ b/arch/sandbox/cpu/u-boot.lds
@@ -14,9 +14,9 @@ SECTIONS
}
_u_boot_sandbox_getopt : {
- *(.u_boot_sandbox_getopt_start)
- *(.u_boot_sandbox_getopt)
- *(.u_boot_sandbox_getopt_end)
+ *(_u_boot_sandbox_getopt_start)
+ *(_u_boot_sandbox_getopt)
+ *(_u_boot_sandbox_getopt_end)
}
efi_runtime_start : {