aboutsummaryrefslogtreecommitdiff
path: root/arch/sandbox
diff options
context:
space:
mode:
authorAndrew Scull <ascull@google.com>2022-05-30 10:00:02 +0000
committerTom Rini <trini@konsulko.com>2022-06-23 12:58:18 -0400
commitaac53d3d96a236c1e62f250ed7ffa8cf9b0e44a6 (patch)
tree2f71df37163ed89da8255335ab11c970ec421ae9 /arch/sandbox
parent337b26e4688720560662246eb7703860b68bd6e2 (diff)
downloadu-boot-aac53d3d96a236c1e62f250ed7ffa8cf9b0e44a6.zip
u-boot-aac53d3d96a236c1e62f250ed7ffa8cf9b0e44a6.tar.gz
u-boot-aac53d3d96a236c1e62f250ed7ffa8cf9b0e44a6.tar.bz2
sandbox: Rename EFI runtime sections
Rename the sections used for placing the EFI runtime 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')
-rw-r--r--arch/sandbox/cpu/u-boot.lds22
-rw-r--r--arch/sandbox/lib/sections.c8
2 files changed, 14 insertions, 16 deletions
diff --git a/arch/sandbox/cpu/u-boot.lds b/arch/sandbox/cpu/u-boot.lds
index 92e834a..d2cb12f 100644
--- a/arch/sandbox/cpu/u-boot.lds
+++ b/arch/sandbox/cpu/u-boot.lds
@@ -19,32 +19,30 @@ SECTIONS
*(.u_boot_sandbox_getopt_end)
}
- .__efi_runtime_start : {
- *(.__efi_runtime_start)
+ efi_runtime_start : {
+ *(___efi_runtime_start)
}
- .efi_runtime : {
+ efi_runtime : {
*(efi_runtime_text)
*(efi_runtime_data)
}
- .__efi_runtime_stop : {
- *(.__efi_runtime_stop)
+ efi_runtime_stop : {
+ *(___efi_runtime_stop)
}
- .efi_runtime_rel_start :
- {
- *(.__efi_runtime_rel_start)
+ efi_runtime_rel_start : {
+ *(___efi_runtime_rel_start)
}
- .efi_runtime_rel : {
+ efi_runtime_rel : {
*(.relefi_runtime_text)
*(.relefi_runtime_data)
}
- .efi_runtime_rel_stop :
- {
- *(.__efi_runtime_rel_stop)
+ efi_runtime_rel_stop : {
+ *(___efi_runtime_rel_stop)
}
.dynsym :
diff --git a/arch/sandbox/lib/sections.c b/arch/sandbox/lib/sections.c
index 2559eee..2f2f3fb 100644
--- a/arch/sandbox/lib/sections.c
+++ b/arch/sandbox/lib/sections.c
@@ -5,9 +5,9 @@
*/
#include <linux/compiler.h>
-char __efi_runtime_start[0] __section(".__efi_runtime_start");
-char __efi_runtime_stop[0] __section(".__efi_runtime_stop");
+char __efi_runtime_start[0] __section("___efi_runtime_start");
+char __efi_runtime_stop[0] __section("___efi_runtime_stop");
char __efi_runtime_rel_start[0]
- __section(".__efi_runtime_rel_start");
+ __section("___efi_runtime_rel_start");
char __efi_runtime_rel_stop[0]
- __section(".__efi_runtime_rel_stop");
+ __section("___efi_runtime_rel_stop");