Message ID | 20240626171652.366415-1-jesse@rivosinc.com (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | [v2,1/3] RISC-V: pi: Force hidden visibility for all symbol references | expand |
On Wed, Jun 26, 2024 at 01:16:50PM -0400, Jesse Taube wrote: > 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> Did you forget to add --cover-letter to your format-patch incantation?
Hi Jesse, On Thu, Jun 27, 2024 at 12:35 PM Conor Dooley <conor.dooley@microchip.com> wrote: > > On Wed, Jun 26, 2024 at 01:16:50PM -0400, Jesse Taube wrote: > > 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> > > Did you forget to add --cover-letter to your format-patch incantation? I admittedly don't understand all the details but it makes the GOT entry disappear and arm64 uses it too, so: Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com> Thanks, Alex
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)
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(+)