| ... | @@ -206,6 +206,7 @@ fn posixCallMainAndExit() noreturn { | ... | @@ -206,6 +206,7 @@ fn posixCallMainAndExit() noreturn { |
| 206 | // Do this as early as possible, the aux vector is needed | 206 | // Do this as early as possible, the aux vector is needed |
| 207 | if (builtin.position_independent_executable) { | 207 | if (builtin.position_independent_executable) { |
| 208 | @import("os/linux/start_pie.zig").apply_relocations(); | 208 | @import("os/linux/start_pie.zig").apply_relocations(); |
| | 209 | @fence(.SeqCst); |
| 209 | } | 210 | } |
| 210 | | 211 | |
| 211 | // Initialize the TLS area. We do a runtime check here to make sure | 212 | // Initialize the TLS area. We do a runtime check here to make sure |
| ... | @@ -214,6 +215,7 @@ fn posixCallMainAndExit() noreturn { | ... | @@ -214,6 +215,7 @@ fn posixCallMainAndExit() noreturn { |
| 214 | const is_dynamic = @import("dynamic_library.zig").get_DYNAMIC() != null; | 215 | const is_dynamic = @import("dynamic_library.zig").get_DYNAMIC() != null; |
| 215 | if (!is_dynamic) { | 216 | if (!is_dynamic) { |
| 216 | std.os.linux.tls.initStaticTLS(); | 217 | std.os.linux.tls.initStaticTLS(); |
| | 218 | @fence(.SeqCst); |
| 217 | } | 219 | } |
| 218 | | 220 | |
| 219 | { | 221 | { |