diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-01-08 10:34:45 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-01-08 10:34:45 -0500 |
| commit | 5a8d87f5042b5ab86de7c72df4ce84a314878e40 (patch) | |
| tree | d9a8e14011994c5ebdf4525ea5c5b647aae91a6e /src/link.cpp | |
| parent | 38658a597bc22697c2038c21bdec9f04c9973eb8 (diff) | |
| parent | 598170756cd91b6f300921d256baa72141ec3098 (diff) | |
| download | zig-5a8d87f5042b5ab86de7c72df4ce84a314878e40.tar.gz zig-5a8d87f5042b5ab86de7c72df4ce84a314878e40.zip | |
Merge branch 'master' into llvm6
Diffstat (limited to 'src/link.cpp')
| -rw-r--r-- | src/link.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/link.cpp b/src/link.cpp index 13e61dd4e7..4396a0daa6 100644 --- a/src/link.cpp +++ b/src/link.cpp @@ -334,6 +334,13 @@ static void construct_linker_job_elf(LinkJob *lj) { if (!g->is_native_target) { lj->args.append("--allow-shlib-undefined"); } + + if (g->zig_target.os == OsZen) { + lj->args.append("-e"); + lj->args.append("main"); + + lj->args.append("--image-base=0x10000000"); + } } //static bool is_target_cyg_mingw(const ZigTarget *target) { @@ -644,7 +651,7 @@ static void get_darwin_platform(LinkJob *lj, DarwinPlatform *platform) { platform->kind = MacOS; } else if (g->mios_version_min) { platform->kind = IPhoneOS; - } else if (g->zig_target.os == ZigLLVM_MacOSX || g->zig_target.os == ZigLLVM_Darwin) { + } else if (g->zig_target.os == OsMacOSX) { platform->kind = MacOS; g->mmacosx_version_min = buf_create_from_str("10.10"); } else { |
