mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 1/3] RISC-V: pi: Force hidden visibility for all symbol references
@ 2024-06-26 17:16 Jesse Taube
  2024-06-26 17:16 ` [PATCH v2 2/3] RISC-V: pi: Add kernel/pi/pi.h Jesse Taube
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Jesse Taube @ 2024-06-26 17:16 UTC (permalink / raw)
  To: linux-riscv
  Cc: Ard Biesheuvel, Paul Walmsley, Palmer Dabbelt, Albert Ou,
	Nathan Chancellor, Nick Desaulniers, Bill Wendling, Justin Stitt,
	Jesse Taube, Alexandre Ghiti, Conor Dooley, Masahiro Yamada,
	Wende Tan, Christophe JAILLET, Sami Tolvanen, Andrew Morton,
	Baoquan He, Chen Jiahao, Mike Rapoport (IBM),
	Vishal Moola (Oracle),
	linux-kernel, llvm

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 <jesse@rivosinc.com>
---
 arch/riscv/kernel/pi/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/riscv/kernel/pi/Makefile b/arch/riscv/kernel/pi/Makefile
index 50bc5ef7dd2f..1ef7584be0c3 100644
--- a/arch/riscv/kernel/pi/Makefile
+++ b/arch/riscv/kernel/pi/Makefile
@@ -5,6 +5,7 @@ KBUILD_CFLAGS	:= $(subst $(CC_FLAGS_FTRACE),,$(KBUILD_CFLAGS)) -fpie \
 		   -Os -DDISABLE_BRANCH_PROFILING $(DISABLE_STACKLEAK_PLUGIN) \
 		   $(call cc-option,-mbranch-protection=none) \
 		   -I$(srctree)/scripts/dtc/libfdt -fno-stack-protector \
+		   -include $(srctree)/include/linux/hidden.h \
 		   -D__DISABLE_EXPORTS -ffreestanding \
 		   -fno-asynchronous-unwind-tables -fno-unwind-tables \
 		   $(call cc-option,-fno-addrsig)
-- 
2.45.2


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-28  9:32 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-26 17:16 [PATCH v2 1/3] RISC-V: pi: Force hidden visibility for all symbol references Jesse Taube
2024-06-26 17:16 ` [PATCH v2 2/3] RISC-V: pi: Add kernel/pi/pi.h Jesse Taube
2024-06-28  9:18   ` Alexandre Ghiti
2024-06-26 17:16 ` [PATCH v2 3/3] RISC-V: Use Zkr to seed KASLR base address Jesse Taube
2024-06-27 11:45   ` Conor Dooley
2024-06-27 17:55     ` Jesse Taube
2024-06-27 18:11       ` Conor Dooley
2024-06-28  9:32   ` Alexandre Ghiti
2024-06-27 10:34 ` [PATCH v2 1/3] RISC-V: pi: Force hidden visibility for all symbol references Conor Dooley
2024-06-28  9:21   ` Alexandre Ghiti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®