summaryrefslogtreecommitdiffstats
path: root/pbl
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2024-03-04 19:59:42 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2024-03-05 16:28:05 +0100
commit22ae71e69d20972f1f8bb80ba9fa971293d5d3f4 (patch)
tree48f95d40eaf6e5ad05e8550c5dcca137481b4689 /pbl
parent0bfc6ab8bc6599720b9aab04ee1b138b96f7e6d2 (diff)
downloadbarebox-22ae71e69d20972f1f8bb80ba9fa971293d5d3f4.tar.gz
barebox-22ae71e69d20972f1f8bb80ba9fa971293d5d3f4.tar.xz
ARM64: runtime-offset: make get_runtime_offset fully PIC
get_runtime_offset returns the offset that needs to be added onto code addresses to arrive at the runtime address. This is 0 after code relocation and the function calculates it by keeping a reference to _text and substituting it from the actual _text address, which is found out in a position-independent manner. For enabling barebox PBL text section to be mappable W^X, we need to avoid relocation entries within code, so let's move the runtime offset into the data section, which is always mapped writable. As ldr has only a 4K range for label references, we switch to ldr_l, which has a 4G range. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20240304190038.3486881-58-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'pbl')
0 files changed, 0 insertions, 0 deletions