]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
arm64: vdso: put ELF related sections in the linker script
authorJoey Gouly <joey.gouly@arm.com>
Tue, 10 May 2022 09:58:31 +0000 (10:58 +0100)
committerWill Deacon <will@kernel.org>
Thu, 23 Jun 2022 14:34:59 +0000 (15:34 +0100)
Use macros from vmlinux.lds.h to explicitly name sections that are included
in the VDSO output.

Signed-off-by: Joey Gouly <joey.gouly@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Kees Cook <keescook@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20220510095834.32394-2-joey.gouly@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/kernel/vdso/vdso.lds.S

index a5e61e09ea927e3020f73e92f96d70c1b90591a2..1cd85258c079e0bb7a34dfa73e8d740f69b607e7 100644 (file)
@@ -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)