Commit eeec7223 authored by Joey Gouly's avatar Joey Gouly Committed by Will Deacon
Browse files

arm64: vdso32: put ELF related sections in the linker script



Use macros from vmlinux.lds.h to explicitly name sections that are included
in the compat VDSO32 output.

Signed-off-by: default avatarJoey 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: default avatarKees Cook <keescook@chromium.org>
Reviewed-by: default avatarVincenzo Frascino <vincenzo.frascino@arm.com>
Link: https://lore.kernel.org/r/20220510095834.32394-4-joey.gouly@arm.com


Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent e0ab20b2
Loading
Loading
Loading
Loading
+21 −1
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@
#include <linux/const.h>
#include <asm/page.h>
#include <asm/vdso.h>
#include <asm-generic/vmlinux.lds.h>

OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
OUTPUT_ARCH(arm)
@@ -37,10 +38,29 @@ SECTIONS

	.rodata		: { *(.rodata*) }		:text

	.text		: { *(.text*) }			:text	=0xe7f001f2
	.text		: {
		*(.text*)
		*(.glue_7)
		*(.glue_7t)
		*(.vfp11_veneer)
		*(.v4_bx)
	}						:text	=0xe7f001f2

	.rel.dyn	: { *(.rel.text) }

	.got		: { *(.got) }
	.rel.got	: { *(.rel.got) }
	.got.plt	: { *(.got.plt) }
	.rel.plt	: { *(.rel.plt) }
	.plt		: {
		*(.plt)
		*(.rel.iplt)
		*(.iplt)
		*(.igot.plt)
	}

	ELF_DETAILS
	.ARM.attributes 0 : { *(.ARM.attributes) }

	/DISCARD/	: {
		*(.note.GNU-stack)