diff options
author | Ard Biesheuvel <ardb@kernel.org> | 2022-06-22 18:10:10 +0200 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2022-06-24 13:08:30 +0100 |
commit | 1c9a8e87680870d5daf1eaa6314373dcc156ac15 (patch) | |
tree | 7795f36f44351c6debfe7fc04d840d31ba3c9502 /arch/arm64/kernel/vmlinux.lds.S | |
parent | 47546a1912fc4a037035746998c3cfa740beed70 (diff) | |
download | linux-1c9a8e87680870d5daf1eaa6314373dcc156ac15.tar.gz linux-1c9a8e87680870d5daf1eaa6314373dcc156ac15.tar.bz2 linux-1c9a8e87680870d5daf1eaa6314373dcc156ac15.zip |
arm64: entry: simplify trampoline data page
Get rid of some clunky open coded arithmetic on section addresses, by
emitting the trampoline data variables into a separate, dedicated r/o
data section, and putting it at the next page boundary. This way, we can
access the literals via single LDR instruction.
While at it, get rid of other, implicit literals, and use ADRP/ADD or
MOVZ/MOVK sequences, as appropriate. Note that the latter are only
supported for CONFIG_RELOCATABLE=n (which is usually the case if
CONFIG_RANDOMIZE_BASE=n), so update the CPP conditionals to reflect
this.
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220622161010.3845775-1-ardb@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
Diffstat (limited to 'arch/arm64/kernel/vmlinux.lds.S')
-rw-r--r-- | arch/arm64/kernel/vmlinux.lds.S | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 2d4a8f995175..8a078c0ee140 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -115,7 +115,8 @@ jiffies = jiffies_64; __entry_tramp_text_start = .; \ *(.entry.tramp.text) \ . = ALIGN(PAGE_SIZE); \ - __entry_tramp_text_end = .; + __entry_tramp_text_end = .; \ + *(.entry.tramp.rodata) #else #define TRAMP_TEXT #endif |