diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2024-03-04 19:59:43 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2024-03-05 16:28:05 +0100 |
commit | a7e6cd8e3efa75b5625c1df3b9ae44c76dd51c0d (patch) | |
tree | 82eed4a92a9da46807a4f73bc8444ed835283de8 /pbl | |
parent | 22ae71e69d20972f1f8bb80ba9fa971293d5d3f4 (diff) | |
download | barebox-a7e6cd8e3efa75b5625c1df3b9ae44c76dd51c0d.tar.gz barebox-a7e6cd8e3efa75b5625c1df3b9ae44c76dd51c0d.tar.xz |
pbl: introduce CONFIG_PBL_FULLY_PIC
In the quest for making barebox PBL code W^X mappable, we have now taken
care to make the ARM64 assembly routines not emit code relocations,
so let's do the same for the C code as well.
We do this by setting pragma GCC visibility push(hidden) globally. This
option is stronger than -fvisibility=hidden and ensures we are
completely position-independent. See kernel commit e544ea57ac07
("x86/boot/compressed: Force hidden visibility for all symbol references")
for more information.
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20240304190038.3486881-59-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'pbl')
-rw-r--r-- | pbl/Kconfig | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/pbl/Kconfig b/pbl/Kconfig index 223bf0640e..669a49a530 100644 --- a/pbl/Kconfig +++ b/pbl/Kconfig @@ -46,6 +46,13 @@ config PBL_RELOCATABLE This option only influences the PBL image. See RELOCATABLE to also make the real image relocatable. +config PBL_FULLY_PIC + bool "fully position-independent pbl image" + depends on PBL_RELOCATABLE && ARM + help + Compared to CONFIG_PBL_RELOCATABLE, this image has no relocations in + the code sections. + config PBL_VERIFY_PIGGY depends on ARM bool "Verify barebox proper hash before decompression" if COMPILE_TEST |