aboutsummaryrefslogtreecommitdiff
path: root/src/target.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-12-26 21:39:39 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-01-01 17:51:21 -0700
commit57562c8d507667b6fefcb7fbc7a305fbd610b5dd (patch)
treef0e494bdace7302f7cce8ad8c9c7d3227bd81d64 /src/target.zig
parentc9fe43679f8d8f0db6250cc881b59cc68daaf128 (diff)
downloadzig-57562c8d507667b6fefcb7fbc7a305fbd610b5dd.tar.gz
zig-57562c8d507667b6fefcb7fbc7a305fbd610b5dd.zip
compiler: push entry symbol name resolution into the linker
This is necessary because on COFF, the entry symbol name is not known until the linker has looked at the set of global symbol names to determine which of the four possible main entry points is present.
Diffstat (limited to 'src/target.zig')
-rw-r--r--src/target.zig20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/target.zig b/src/target.zig
index d1a98601cf..262632b373 100644
--- a/src/target.zig
+++ b/src/target.zig
@@ -683,23 +683,3 @@ pub fn backendSupportsFeature(
.safety_checked_instructions => use_llvm,
};
}
-
-pub fn defaultEntrySymbolName(
- target: std.Target,
- /// May be `undefined` when `target` is not WASI.
- wasi_exec_model: std.builtin.WasiExecModel,
-) ?[]const u8 {
- return switch (target.ofmt) {
- .coff => "wWinMainCRTStartup",
- .macho => "_main",
- .elf, .plan9 => switch (target.cpu.arch) {
- .mips, .mipsel, .mips64, .mips64el => "__start",
- else => "_start",
- },
- .wasm => switch (wasi_exec_model) {
- .reactor => "_initialize",
- .command => "_start",
- },
- else => null,
- };
-}