From: Felix Fu fuzhen5@huawei.com
Offering: HULK hulk inclusion category: feature bugzilla: https://gitee.com/src-openeuler/kernel/issues/IAI881
-----------------------------------------
This reverts commit 948402ac58d7d852a03dd5964b56310a0f75019d.
Signed-off-by: Felix Fu fuzhen5@huawei.com --- arch/arm/Kconfig | 5 ----- arch/arm/Makefile | 7 ------- arch/arm/include/asm/assembler.h | 6 +++--- arch/arm/include/asm/vmlinux.lds.h | 6 +----- arch/arm/kernel/vmlinux.lds.S | 6 ------ scripts/module.lds.S | 1 - 6 files changed, 4 insertions(+), 27 deletions(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index a82bef783210..749935e2e3b7 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1453,11 +1453,6 @@ config STACKPROTECTOR_PER_TASK Enable this option to switch to a different method that uses a different canary value for each task.
-config RELOCATABLE - bool - depends on !XIP_KERNEL && !JUMP_LABEL - select HAVE_ARCH_PREL32_RELOCATIONS - endmenu
menu "Boot options" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index f3236584b12e..547e5856eaa0 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -51,13 +51,6 @@ CHECKFLAGS += -D__ARMEL__ KBUILD_LDFLAGS += -EL endif
-ifeq ($(CONFIG_RELOCATABLE),y) -KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h -CFLAGS_KERNEL += -fpic -CFLAGS_MODULE += -fno-pic -LDFLAGS_vmlinux += -pie -shared -Bsymbolic -endif - # # The Scalar Replacement of Aggregates (SRA) optimization pass in GCC 4.9 and # later may result in code being generated that handles signed short and signed diff --git a/arch/arm/include/asm/assembler.h b/arch/arm/include/asm/assembler.h index 3b4d68187232..7db72fba1540 100644 --- a/arch/arm/include/asm/assembler.h +++ b/arch/arm/include/asm/assembler.h @@ -625,12 +625,12 @@ THUMB( orr \reg , \reg , #PSR_T_BIT ) * mov_l - move a constant value or [relocated] address into a register */ .macro mov_l, dst:req, imm:req, cond -#if defined(CONFIG_RELOCATABLE) || __LINUX_ARM_ARCH__ < 7 + .if __LINUX_ARM_ARCH__ < 7 ldr\cond \dst, =\imm -#else + .else movw\cond \dst, #:lower16:\imm movt\cond \dst, #:upper16:\imm -#endif + .endif .endm
/* diff --git a/arch/arm/include/asm/vmlinux.lds.h b/arch/arm/include/asm/vmlinux.lds.h index 579becda9453..4c8632d5c432 100644 --- a/arch/arm/include/asm/vmlinux.lds.h +++ b/arch/arm/include/asm/vmlinux.lds.h @@ -63,11 +63,7 @@ EXIT_CALL \ ARM_MMU_DISCARD(*(.text.fixup)) \ ARM_MMU_DISCARD(*(__ex_table)) \ - COMMON_DISCARDS \ - *(.ARM.exidx.discard.text) \ - *(.interp .dynamic) \ - *(.dynsym .dynstr .hash) - + COMMON_DISCARDS
/* * Sections that should stay zero sized, which is safer to explicitly diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index d6ccf647eef7..bd9127c4b451 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -114,12 +114,6 @@ SECTIONS __smpalt_end = .; } #endif - .rel.dyn : ALIGN(8) { - __rel_begin = .; - *(.rel .rel.* .rel.dyn) - } - __rel_end = ADDR(.rel.dyn) + SIZEOF(.rel.dyn); - .init.pv_table : { __pv_table_begin = .; *(.pv_table) diff --git a/scripts/module.lds.S b/scripts/module.lds.S index 25a85dbae205..bf5bcf2836d8 100644 --- a/scripts/module.lds.S +++ b/scripts/module.lds.S @@ -13,7 +13,6 @@ SECTIONS { /DISCARD/ : { *(.discard) *(.discard.*) - *(*.discard.*) }
__ksymtab 0 : { *(SORT(___ksymtab+*)) }