Skip to content

Commit 892c9b5

Browse files
authored
Merge pull request #40 from soxfox42/fix_args
Fix macOS linking + argv
2 parents 2f732e7 + b252af5 commit 892c9b5

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 .data\n", useGas? "." : "");
501500
foreach (i, ref array ; arrays) {
502501
output ~= format("__array_src_%d: ", i);
503502

0 commit comments

Comments
 (0)