Skip to content

Commit cfbc7e7

Browse files
committed
fix mac linking again - also fixes argv
1 parent feb2e2a commit cfbc7e7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/backends/x86_64.d

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ class BackendX86_64 : CompilerBackend {
202202

203203
if (os == "osx") {
204204
linkCommand ~= " -platform_version macos 10.6 `xcrun --sdk macosx --show-sdk-version`";
205-
linkCommand ~= " -ld_classic -no_pie -e _main";
206205
linkCommand ~= " -lSystem -syslibroot `xcrun --sdk macosx --show-sdk-path`";
207206
}
208207

@@ -497,7 +496,7 @@ class BackendX86_64 : CompilerBackend {
497496
}
498497

499498
// create array source
500-
output ~= format("%ssection .text\n", useGas? "." : "");
499+
output ~= format("%ssection .rodata\n", useGas? "." : "");
501500
foreach (i, ref array ; arrays) {
502501
output ~= format("__array_src_%d: ", i);
503502

0 commit comments

Comments
 (0)