diff --git a/clang/lib/Driver/ToolChains/Fuchsia.cpp b/clang/lib/Driver/ToolChains/Fuchsia.cpp index cb84499320f3..e7d38ff9f227 100644 --- a/clang/lib/Driver/ToolChains/Fuchsia.cpp +++ b/clang/lib/Driver/ToolChains/Fuchsia.cpp @@ -52,7 +52,7 @@ void fuchsia::Linker::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-z"); CmdArgs.push_back("rodynamic"); CmdArgs.push_back("-z"); - CmdArgs.push_back("separate-code"); + CmdArgs.push_back("separate-loadable-segments"); } if (!D.SysRoot.empty()) diff --git a/clang/test/Driver/fuchsia.c b/clang/test/Driver/fuchsia.c index ec664fb3b5a8..bf8e5a04dc91 100644 --- a/clang/test/Driver/fuchsia.c +++ b/clang/test/Driver/fuchsia.c @@ -16,7 +16,7 @@ // CHECK: "-fsanitize=safe-stack" // CHECK: "-stack-protector" "2" // CHECK: "-fno-common" -// CHECK: {{.*}}ld.lld{{.*}}" "-z" "rodynamic" "-z" "separate-code" +// CHECK: {{.*}}ld.lld{{.*}}" "-z" "rodynamic" "-z" "separate-loadable-segments" // CHECK: "--sysroot=[[SYSROOT]]" // CHECK: "-pie" // CHECK: "--build-id"