[PATCH] D35582: [Driver] Always use -z rodynamic for Fuchsia
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 18 14:08:50 PDT 2017
phosek created this revision.
Fuchsia uses read-only .dynamic section.
Repository:
rL LLVM
https://reviews.llvm.org/D35582
Files:
lib/Driver/ToolChains/Fuchsia.cpp
test/Driver/fuchsia.c
test/Driver/fuchsia.cpp
Index: test/Driver/fuchsia.cpp
===================================================================
--- test/Driver/fuchsia.cpp
+++ test/Driver/fuchsia.cpp
@@ -7,6 +7,7 @@
// CHECK: "-internal-isystem" "{{.*[/\\]}}x86_64-fuchsia{{/|\\\\}}include{{/|\\\\}}c++{{/|\\\\}}v1"
// CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
// CHECK: {{.*}}lld{{.*}}" "-flavor" "gnu"
+// CHECK: "-z" "rodynamic"
// CHECK: "--sysroot=[[SYSROOT]]"
// CHECK: "-pie"
// CHECK: "--build-id"
Index: test/Driver/fuchsia.c
===================================================================
--- test/Driver/fuchsia.c
+++ test/Driver/fuchsia.c
@@ -5,6 +5,7 @@
// CHECK: "-isysroot" "[[SYSROOT:[^"]+]]"
// CHECK: "-internal-externc-isystem" "[[SYSROOT]]{{/|\\\\}}include"
// CHECK: {{.*}}lld{{.*}}" "-flavor" "gnu"
+// CHECK: "-z" "rodynamic"
// CHECK: "--sysroot=[[SYSROOT]]"
// CHECK: "-pie"
// CHECK: "--build-id"
Index: lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- lib/Driver/ToolChains/Fuchsia.cpp
+++ lib/Driver/ToolChains/Fuchsia.cpp
@@ -48,6 +48,9 @@
CmdArgs.push_back("gnu");
}
+ CmdArgs.push_back("-z");
+ CmdArgs.push_back("rodynamic");
+
if (!D.SysRoot.empty())
CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35582.107177.patch
Type: text/x-patch
Size: 1323 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170718/e1a7afa7/attachment.bin>
More information about the cfe-commits
mailing list