Merge branch 'for-next/vdso' into for-next/core
* for-next/vdso: arm64: vdso32: Add DWARF_DEBUG arm64: vdso32: Shuffle .ARM.exidx section above ELF_DETAILS arm64: compat: Move sigreturn32.S to .rodata section arm64: vdso*: place got/plt sections in .rodata arm64: vdso32: add ARM.exidx* sections arm64: compat: Move kuser32.S to .rodata section arm64: vdso32: enable orphan handling for VDSO arm64: vdso32: put ELF related sections in the linker script arm64: vdso: enable orphan handling for VDSO arm64: vdso: put ELF related sections in the linker script
This commit is contained in:
commit
e8da08fc3d
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
|
||||||
|
.section .rodata
|
||||||
.align 5
|
.align 5
|
||||||
.globl __kuser_helper_start
|
.globl __kuser_helper_start
|
||||||
__kuser_helper_start:
|
__kuser_helper_start:
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
|
||||||
|
.section .rodata
|
||||||
.globl __aarch32_sigret_code_start
|
.globl __aarch32_sigret_code_start
|
||||||
__aarch32_sigret_code_start:
|
__aarch32_sigret_code_start:
|
||||||
|
|
||||||
|
@ -24,7 +24,13 @@ btildflags-$(CONFIG_ARM64_BTI_KERNEL) += -z force-bti
|
|||||||
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
|
# routines, as x86 does (see 6f121e548f83 ("x86, vdso: Reimplement vdso.so
|
||||||
# preparation in build-time C")).
|
# preparation in build-time C")).
|
||||||
ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv \
|
ldflags-y := -shared -soname=linux-vdso.so.1 --hash-style=sysv \
|
||||||
-Bsymbolic --build-id=sha1 -n $(btildflags-y) -T
|
-Bsymbolic --build-id=sha1 -n $(btildflags-y)
|
||||||
|
|
||||||
|
ifdef CONFIG_LD_ORPHAN_WARN
|
||||||
|
ldflags-y += --orphan-handling=warn
|
||||||
|
endif
|
||||||
|
|
||||||
|
ldflags-y += -T
|
||||||
|
|
||||||
ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
|
ccflags-y := -fno-common -fno-builtin -fno-stack-protector -ffixed-x18
|
||||||
ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
|
ccflags-y += -DDISABLE_BRANCH_PROFILING -DBUILD_VDSO
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <linux/const.h>
|
#include <linux/const.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/vdso.h>
|
#include <asm/vdso.h>
|
||||||
|
#include <asm-generic/vmlinux.lds.h>
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64", "elf64-littleaarch64")
|
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-bigaarch64", "elf64-littleaarch64")
|
||||||
OUTPUT_ARCH(aarch64)
|
OUTPUT_ARCH(aarch64)
|
||||||
@ -49,11 +50,24 @@ SECTIONS
|
|||||||
|
|
||||||
.dynamic : { *(.dynamic) } :text :dynamic
|
.dynamic : { *(.dynamic) } :text :dynamic
|
||||||
|
|
||||||
.rodata : { *(.rodata*) } :text
|
.rela.dyn : ALIGN(8) { *(.rela .rela*) }
|
||||||
|
|
||||||
|
.rodata : {
|
||||||
|
*(.rodata*)
|
||||||
|
*(.got)
|
||||||
|
*(.got.plt)
|
||||||
|
*(.plt)
|
||||||
|
*(.plt.*)
|
||||||
|
*(.iplt)
|
||||||
|
*(.igot .igot.plt)
|
||||||
|
} :text
|
||||||
|
|
||||||
_end = .;
|
_end = .;
|
||||||
PROVIDE(end = .);
|
PROVIDE(end = .);
|
||||||
|
|
||||||
|
DWARF_DEBUG
|
||||||
|
ELF_DETAILS
|
||||||
|
|
||||||
/DISCARD/ : {
|
/DISCARD/ : {
|
||||||
*(.data .data.* .gnu.linkonce.d.* .sdata*)
|
*(.data .data.* .gnu.linkonce.d.* .sdata*)
|
||||||
*(.bss .sbss .dynbss .dynsbss)
|
*(.bss .sbss .dynbss .dynsbss)
|
||||||
|
@ -104,6 +104,7 @@ VDSO_AFLAGS += -D__ASSEMBLY__
|
|||||||
VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
|
VDSO_LDFLAGS += -Bsymbolic --no-undefined -soname=linux-vdso.so.1
|
||||||
VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
|
VDSO_LDFLAGS += -z max-page-size=4096 -z common-page-size=4096
|
||||||
VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1
|
VDSO_LDFLAGS += -shared --hash-style=sysv --build-id=sha1
|
||||||
|
VDSO_LDFLAGS += --orphan-handling=warn
|
||||||
|
|
||||||
|
|
||||||
# Borrow vdsomunge.c from the arm vDSO
|
# Borrow vdsomunge.c from the arm vDSO
|
||||||
|
@ -11,6 +11,7 @@
|
|||||||
#include <linux/const.h>
|
#include <linux/const.h>
|
||||||
#include <asm/page.h>
|
#include <asm/page.h>
|
||||||
#include <asm/vdso.h>
|
#include <asm/vdso.h>
|
||||||
|
#include <asm-generic/vmlinux.lds.h>
|
||||||
|
|
||||||
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
OUTPUT_FORMAT("elf32-littlearm", "elf32-bigarm", "elf32-littlearm")
|
||||||
OUTPUT_ARCH(arm)
|
OUTPUT_ARCH(arm)
|
||||||
@ -35,12 +36,30 @@ SECTIONS
|
|||||||
|
|
||||||
.dynamic : { *(.dynamic) } :text :dynamic
|
.dynamic : { *(.dynamic) } :text :dynamic
|
||||||
|
|
||||||
.rodata : { *(.rodata*) } :text
|
.rodata : {
|
||||||
|
*(.rodata*)
|
||||||
|
*(.got)
|
||||||
|
*(.got.plt)
|
||||||
|
*(.plt)
|
||||||
|
*(.rel.iplt)
|
||||||
|
*(.iplt)
|
||||||
|
*(.igot.plt)
|
||||||
|
} :text
|
||||||
|
|
||||||
.text : { *(.text*) } :text =0xe7f001f2
|
.text : {
|
||||||
|
*(.text*)
|
||||||
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
*(.vfp11_veneer)
|
||||||
|
*(.v4_bx)
|
||||||
|
} :text =0xe7f001f2
|
||||||
|
|
||||||
.got : { *(.got) }
|
.rel.dyn : { *(.rel*) }
|
||||||
.rel.plt : { *(.rel.plt) }
|
|
||||||
|
.ARM.exidx : { *(.ARM.exidx*) }
|
||||||
|
DWARF_DEBUG
|
||||||
|
ELF_DETAILS
|
||||||
|
.ARM.attributes 0 : { *(.ARM.attributes) }
|
||||||
|
|
||||||
/DISCARD/ : {
|
/DISCARD/ : {
|
||||||
*(.note.GNU-stack)
|
*(.note.GNU-stack)
|
||||||
|
Loading…
Reference in New Issue
Block a user