Skip to content

Commit 14c3ec6

Browse files
Mr-Bossmanpalmer-dabbelt
authored andcommitted
RISC-V: pi: Force hidden visibility for all symbol references
Eliminate all GOT entries in the .pi section, by forcing hidden visibility for all symbol references, which informs the compiler that such references will be resolved at link time without the need for allocating GOT entries. Include linux/hidden.h in Makefile, like arm64, for the hidden visibility attribute. Signed-off-by: Jesse Taube <[email protected]> Reviewed-by: Alexandre Ghiti <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Palmer Dabbelt <[email protected]>
1 parent 1613e60 commit 14c3ec6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arch/riscv/kernel/pi/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ KBUILD_CFLAGS := $(subst $(CC_FLAGS_FTRACE),,$(KBUILD_CFLAGS)) -fpie \
55
-Os -DDISABLE_BRANCH_PROFILING $(DISABLE_STACKLEAK_PLUGIN) \
66
$(call cc-option,-mbranch-protection=none) \
77
-I$(srctree)/scripts/dtc/libfdt -fno-stack-protector \
8+
-include $(srctree)/include/linux/hidden.h \
89
-D__DISABLE_EXPORTS -ffreestanding \
910
-fno-asynchronous-unwind-tables -fno-unwind-tables \
1011
$(call cc-option,-fno-addrsig)

0 commit comments

Comments
 (0)