[PATCH] D158822: [Fuchsia] Make __start_* / __stop_* symbols hidden
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 25 00:49:11 PDT 2023
phosek updated this revision to Diff 553402.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158822/new/
https://reviews.llvm.org/D158822
Files:
clang/lib/Driver/ToolChains/Fuchsia.cpp
Index: clang/lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -56,15 +56,21 @@
CmdArgs.push_back("-z");
CmdArgs.push_back("now");
+ CmdArgs.push_back("-z");
+ CmdArgs.push_back("start-stop-visibility=hidden");
+
const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
if (llvm::sys::path::filename(Exec).equals_insensitive("ld.lld") ||
llvm::sys::path::stem(Exec).equals_insensitive("ld.lld")) {
+ CmdArgs.push_back("-z");
+ CmdArgs.push_back("rel");
+
CmdArgs.push_back("-z");
CmdArgs.push_back("rodynamic");
+
CmdArgs.push_back("-z");
CmdArgs.push_back("separate-loadable-segments");
- CmdArgs.push_back("-z");
- CmdArgs.push_back("rel");
+
CmdArgs.push_back("--pack-dyn-relocs=relr");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158822.553402.patch
Type: text/x-patch
Size: 909 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230825/e77adab9/attachment.bin>
More information about the cfe-commits
mailing list