diff options
author | Andrew Scull <ascull@google.com> | 2022-05-30 10:00:03 +0000 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-06-23 12:58:18 -0400 |
commit | 0648b132696532c96c3656876c5b12ac336e1b27 (patch) | |
tree | 487bbffca17b31ba71547ff5da66af54755485d4 /arch/sandbox/include/asm/getopt.h | |
parent | aac53d3d96a236c1e62f250ed7ffa8cf9b0e44a6 (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/include/asm/getopt.h')
-rw-r--r-- | arch/sandbox/include/asm/getopt.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sandbox/include/asm/getopt.h b/arch/sandbox/include/asm/getopt.h index d2145ad6e2d..df30572d6c9 100644 --- a/arch/sandbox/include/asm/getopt.h +++ b/arch/sandbox/include/asm/getopt.h @@ -44,7 +44,7 @@ struct sandbox_cmdline_option { .callback = sandbox_cmdline_cb_##f, \ }; \ /* Ppointer to the struct in a special section for the linker script */ \ - static __used __section(".u_boot_sandbox_getopt") \ + static __used __section("_u_boot_sandbox_getopt") \ struct sandbox_cmdline_option \ *sandbox_cmdline_option_##f##_ptr = \ &sandbox_cmdline_option_##f |