[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:46:36 PDT 2023
phosek created this revision.
phosek added a reviewer: mcgrathr.
Herald added a subscriber: abrachet.
Herald added a project: All.
phosek requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.
This is the intended semantics, see for more details:
https://sourceware.org/pipermail/binutils/2020-June/111685.html
Repository:
rG LLVM Github Monorepo
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
@@ -60,11 +60,13 @@
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("start-stop-visibility=hidden");
CmdArgs.push_back("--pack-dyn-relocs=relr");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158822.553400.patch
Type: text/x-patch
Size: 747 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230825/9e978797/attachment.bin>
More information about the cfe-commits
mailing list