From: Joey Gouly Date: Tue, 10 May 2022 09:58:33 +0000 (+0100) Subject: arm64: vdso32: put ELF related sections in the linker script X-Git-Tag: v6.0-rc1~203^2~3^2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eeec7223b6977b28dc0ae657a6f56dfef9eb868a;p=thirdparty%2Flinux.git 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: Joey Gouly Cc: Catalin Marinas Cc: Will Deacon Cc: Masahiro Yamada Cc: Vincenzo Frascino Cc: Kees Cook Reviewed-by: Kees Cook Reviewed-by: Vincenzo Frascino Link: https://lore.kernel.org/r/20220510095834.32394-4-joey.gouly@arm.com Signed-off-by: Will Deacon --- diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S index 3348ce5ea306d..120cf422036ff 100644 --- a/arch/arm64/kernel/vdso32/vdso.lds.S +++ b/arch/arm64/kernel/vdso32/vdso.lds.S @@ -11,6 +11,7 @@ #include #include #include +#include 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)