[PATCH] D113136: [Clang] Pass -z rel to linker for Fuchsia
Roland McGrath via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 10 13:31:35 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGff11f0aa5de1: [Clang] Pass -z rel to linker for Fuchsia (authored by mcgrathr).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D113136/new/
https://reviews.llvm.org/D113136
Files:
clang/lib/Driver/ToolChains/Fuchsia.cpp
clang/test/Driver/fuchsia.c
Index: clang/test/Driver/fuchsia.c
===================================================================
--- clang/test/Driver/fuchsia.c
+++ clang/test/Driver/fuchsia.c
@@ -35,7 +35,7 @@
// CHECK-X86_64: "-fsanitize=safe-stack"
// CHECK: "-stack-protector" "2"
// CHECK-NOT: "-fcommon"
-// CHECK: {{.*}}ld.lld{{.*}}" "-z" "max-page-size=4096" "-z" "now" "-z" "rodynamic" "-z" "separate-loadable-segments" "--pack-dyn-relocs=relr"
+// CHECK: {{.*}}ld.lld{{.*}}" "-z" "max-page-size=4096" "-z" "now" "-z" "rodynamic" "-z" "separate-loadable-segments" "-z" "rel" "--pack-dyn-relocs=relr"
// CHECK: "--sysroot=[[SYSROOT]]"
// CHECK: "-pie"
// CHECK: "--build-id"
Index: clang/lib/Driver/ToolChains/Fuchsia.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Fuchsia.cpp
+++ clang/lib/Driver/ToolChains/Fuchsia.cpp
@@ -60,6 +60,8 @@
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: D113136.386302.patch
Type: text/x-patch
Size: 1123 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211110/2bf30bf3/attachment.bin>
More information about the cfe-commits
mailing list