Skip to content

Commit 4461d48

Browse files
1 parent d68c9ed commit 4461d48

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

lib/Driver/UnixToolChains.cpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,6 @@ toolchains::GenericUnix::constructInvocation(const DynamicLinkJobAction &job,
214214
#else
215215
Arguments.push_back(context.Args.MakeArgString("-fuse-ld=" + Linker));
216216
#endif
217-
// Starting with lld 13, Swift stopped working with the lld --gc-sections
218-
// implementation for ELF, unless -z nostart-stop-gc is also passed to lld:
219-
//
220-
// https://reviews.llvm.org/D96914
221-
if (Linker == "lld" || (Linker.length() > 5 &&
222-
Linker.substr(Linker.length() - 6) == "ld.lld")) {
223-
Arguments.push_back("-Xlinker");
224-
Arguments.push_back("-z");
225-
Arguments.push_back("-Xlinker");
226-
Arguments.push_back("nostart-stop-gc");
227-
}
228217
}
229218

230219
// Configure the toolchain.

stdlib/public/runtime/SwiftRT-ELF-WASM.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static const void *__backtraceRef __attribute__((used))
3636
// by the linker. Otherwise, we may end up with undefined symbol references as
3737
// the linker table section was never constructed.
3838
#if defined(__ELF__)
39-
# define DECLARE_EMPTY_METADATA_SECTION(name) __asm__("\t.section " #name ",\"a\"\n");
39+
# define DECLARE_EMPTY_METADATA_SECTION(name) __asm__("\t.section " #name ",\"aR\"\n");
4040
#elif defined(__wasm__)
4141
# define DECLARE_EMPTY_METADATA_SECTION(name) \
4242
__asm__( \

0 commit comments

Comments
 (0)