aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-01-12 20:17:30 +0000
committergingerBill <bill@gingerbill.org>2022-01-12 20:17:30 +0000
commite30f16b1f3fa5630c43c62f5602e26aa8d55e53b (patch)
treea296c94737106b871e4d4be1940fddefd9248ad8 /src/main.cpp
parent7df93ea5044bcc4cb5d9bb15a511b449225b2182 (diff)
Correct `-init` for *nix
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 444ab44f0..9b2c5d5de 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -445,7 +445,7 @@ i32 linker_stage(lbGenerator *gen) {
// so it doesn't generate symbols which cannot be relocated.
link_settings = gb_string_appendc(link_settings, "-shared ");
- // NOTE(dweiler): __$startup_runtime must be called at initialization
+ // NOTE(dweiler): _odin_entry_point must be called at initialization
// time of the shared object, we can pass -init to the linker by using
// a comma separated list of arguments to -Wl.
//
@@ -457,10 +457,10 @@ i32 linker_stage(lbGenerator *gen) {
// Shared libraries are .dylib on MacOS and .so on Linux.
#if defined(GB_SYSTEM_OSX)
output_ext = STR_LIT(".dylib");
- link_settings = gb_string_appendc(link_settings, "-Wl,-init,'___$startup_runtime' ");
+ link_settings = gb_string_appendc(link_settings, "-Wl,-init,'__odin_entry_point' ");
#else
output_ext = STR_LIT(".so");
- link_settings = gb_string_appendc(link_settings, "-Wl,-init,'__$startup_runtime' ");
+ link_settings = gb_string_appendc(link_settings, "-Wl,-init,'__odin_entry_point' ");
#endif
} else {
link_settings = gb_string_appendc(link_settings, "-no-pie ");