Message ID | 20220414104611.17748-4-joey.gouly@arm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Enable orphan-handling=warn for VDSO | expand |
On Thu, Apr 14, 2022 at 11:46:10AM +0100, Joey Gouly wrote: > Use macros from vmlinux.lds.h to explicitly name sections that are included > in the compat VDSO32 output. > > Signed-off-by: Joey Gouly <joey.gouly@arm.com> Reviewed-by: Kees Cook <keescook@chromium.org>
On 4/14/22 11:46 AM, Joey Gouly wrote: > Use macros from vmlinux.lds.h to explicitly name sections that are included > in the compat VDSO32 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: Vincenzo Frascino <vincenzo.frascino@arm.com> > --- > arch/arm64/kernel/vdso32/vdso.lds.S | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S > index 3348ce5ea306..3bb955f08240 100644 > --- a/arch/arm64/kernel/vdso32/vdso.lds.S > +++ b/arch/arm64/kernel/vdso32/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("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") > OUTPUT_ARCH(arm) > @@ -42,6 +43,9 @@ SECTIONS > .got : { *(.got) } > .rel.plt : { *(.rel.plt) } > > + ELF_DETAILS > + .ARM.attributes 0 : { *(.ARM.attributes) } > + > /DISCARD/ : { > *(.note.GNU-stack) > *(.data .data.* .gnu.linkonce.d.* .sdata*)
diff --git a/arch/arm64/kernel/vdso32/vdso.lds.S b/arch/arm64/kernel/vdso32/vdso.lds.S index 3348ce5ea306..3bb955f08240 100644 --- a/arch/arm64/kernel/vdso32/vdso.lds.S +++ b/arch/arm64/kernel/vdso32/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("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") OUTPUT_ARCH(arm) @@ -42,6 +43,9 @@ SECTIONS .got : { *(.got) } .rel.plt : { *(.rel.plt) } + ELF_DETAILS + .ARM.attributes 0 : { *(.ARM.attributes) } + /DISCARD/ : { *(.note.GNU-stack) *(.data .data.* .gnu.linkonce.d.* .sdata*)
Use macros from vmlinux.lds.h to explicitly name sections that are included in the compat VDSO32 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> --- arch/arm64/kernel/vdso32/vdso.lds.S | 4 ++++ 1 file changed, 4 insertions(+)