diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2020-11-27 20:31:26 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-27 20:31:26 +0100 |
| commit | 02baaac506d0d64d1c946219335b7492222c4b64 (patch) | |
| tree | 520378f4e3ef336e696abae433644e5cb2e9f7ca /src/codegen.zig | |
| parent | ebb2f208159c46fed3aadfcefd2a5524bc46011b (diff) | |
| download | zig-02baaac506d0d64d1c946219335b7492222c4b64.tar.gz zig-02baaac506d0d64d1c946219335b7492222c4b64.zip | |
Update src/codegen.zig
Co-authored-by: Andrew Kelley <andrew@ziglang.org>
Diffstat (limited to 'src/codegen.zig')
| -rw-r--r-- | src/codegen.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.zig b/src/codegen.zig index af91e7e909..8bd08af15c 100644 --- a/src/codegen.zig +++ b/src/codegen.zig @@ -2584,7 +2584,7 @@ fn Function(comptime arch: std.Target.Cpu.Arch) type { }, .register => return self.fail(src, "TODO implement genSetReg for aarch64 {}", .{mcv}), .memory => |addr| { - if (self.bin_file.cast(link.File.MachO)) |macho_file| { + if (self.bin_file.options.pie) { // For MachO, the binary, with the exception of object files, has to be a PIE. // Therefore we cannot load an absolute address. // Instead, we need to make use of PC-relative addressing. |
