aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Gouly <[email protected]>2022-05-10 10:58:31 +0100
committerWill Deacon <[email protected]>2022-06-23 15:34:59 +0100
commitb87d34ca60cedd6ad769da69c39c4329647fc6a9 (patch)
treece18f38ff3b14c6592c1c93fa5b7f062d8454a05
parenta111daf0c53ae91e71fd2bfe7497862d14132e3e (diff)
arm64: vdso: put ELF related sections in the linker script
Use macros from vmlinux.lds.h to explicitly name sections that are included in the VDSO output. Signed-off-by: Joey Gouly <[email protected]> Cc: Catalin Marinas <[email protected]> Cc: Will Deacon <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Vincenzo Frascino <[email protected]> Cc: Kees Cook <[email protected]> Reviewed-by: Kees Cook <[email protected]> Reviewed-by: Vincenzo Frascino <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
-rw-r--r--arch/arm64/kernel/vdso/vdso.lds.S16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm64/kernel/vdso/vdso.lds.S b/arch/arm64/kernel/vdso/vdso.lds.S
index a5e61e09ea92..1cd85258c079 100644
--- a/arch/arm64/kernel/vdso/vdso.lds.S
+++ b/arch/arm64/kernel/vdso/vdso.lds.S
@@ -11,6 +11,7 @@
#include <linux/const.h>
#include <asm/page.h>
#include <asm/vdso.h>
+#include <asm-generic/vmlinux.lds.h>
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64", "elf64-littleaarch64")
OUTPUT_ARCH(aarch64)
@@ -49,11 +50,26 @@ SECTIONS
.dynamic : { *(.dynamic) } :text :dynamic
+ .rela.dyn : ALIGN(8) { *(.rela .rela*) }
+
+ .plt : {
+ *(.plt)
+ *(.plt.*)
+ *(.iplt)
+ *(.igot .igot.plt)
+ }
+
+ .got : { *(.got) }
+ .got.plt : { *(.got.plt) }
+
.rodata : { *(.rodata*) } :text
_end = .;
PROVIDE(end = .);
+ DWARF_DEBUG
+ ELF_DETAILS
+
/DISCARD/ : {
*(.data .data.* .gnu.linkonce.d.* .sdata*)
*(.bss .sbss .dynbss .dynsbss)