From: Jesse Taube <jesse@rivosinc.com>
To: linux-riscv@lists.infradead.org
Cc: Ard Biesheuvel <ardb@kernel.org>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Jesse Taube <jesse@rivosinc.com>,
Alexandre Ghiti <alexghiti@rivosinc.com>,
Conor Dooley <conor.dooley@microchip.com>,
Masahiro Yamada <masahiroy@kernel.org>,
Wende Tan <twd2.me@gmail.com>,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
Sami Tolvanen <samitolvanen@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Baoquan He <bhe@redhat.com>,
Chen Jiahao <chenjiahao16@huawei.com>,
"Mike Rapoport (IBM)" <rppt@kernel.org>,
"Vishal Moola (Oracle)" <vishal.moola@gmail.com>,
linux-kernel@vger.kernel.org, llvm@lists.linux.dev
Subject: [PATCH v2 1/3] RISC-V: pi: Force hidden visibility for all symbol references
Date: Wed, 26 Jun 2024 13:16:50 -0400 [thread overview]
Message-ID: <20240626171652.366415-1-jesse@rivosinc.com> (raw)
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
next reply other threads:[~2024-06-26 17:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-26 17:16 Jesse Taube [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240626171652.366415-1-jesse@rivosinc.com \
--to=jesse@rivosinc.com \
--cc=akpm@linux-foundation.org \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=ardb@kernel.org \
--cc=bhe@redhat.com \
--cc=chenjiahao16@huawei.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor.dooley@microchip.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=llvm@lists.linux.dev \
--cc=masahiroy@kernel.org \
--cc=morbo@google.com \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rppt@kernel.org \
--cc=samitolvanen@google.com \
--cc=twd2.me@gmail.com \
--cc=vishal.moola@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®