diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-02-18 16:47:30 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-02-18 16:47:30 -0500 |
| commit | 28bf768883d2411d4cd75582d396d465ab6a54b2 (patch) | |
| tree | 542fb1bed1e22462938a62b5caf647c366dfc0c2 /std/debug/index.zig | |
| parent | 74a335c4ccd9eb4cfcc5cc6c01b633584c6bb6ba (diff) | |
| download | zig-28bf768883d2411d4cd75582d396d465ab6a54b2.tar.gz zig-28bf768883d2411d4cd75582d396d465ab6a54b2.zip | |
export _mh_execute_header with weak linkage
* also fix extern variables with initialiaztion values to generate runtime code
* remove the workaround in example/shared_library/mathtest.zig
* introduce the ability for global variables to have Weak and LinkOnce
linkage
* fix `@export` to work for non-functions. this code needs to be
audited though.
* fix comptime ptrcast not keeping bigger alignment
* fix linker warnings when targeting darwin
closes #1903
Diffstat (limited to 'std/debug/index.zig')
| -rw-r--r-- | std/debug/index.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/debug/index.zig b/std/debug/index.zig index b8ea7e7f84..1d93e0227e 100644 --- a/std/debug/index.zig +++ b/std/debug/index.zig @@ -574,7 +574,7 @@ fn machoSearchSymbols(symbols: []const MachoSymbol, address: usize) ?*const Mach } fn printSourceAtAddressMacOs(di: *DebugInfo, out_stream: var, address: usize, tty_color: bool) !void { - const base_addr = @ptrToInt(&std.c._mh_execute_header); + const base_addr = std.os.getBaseAddress(); const adjusted_addr = 0x100000000 + (address - base_addr); const symbol = machoSearchSymbols(di.symbols, adjusted_addr) orelse { |
