zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit d8c4838c7da9efef07fcf5b8e709bb2a65cd2209 (tree)
parent 9f20a51555169dfcc531b06390001d3dbd78094d
Author: Jakub Konka <kubkon@jakubkonka.com>
Date:   Sat, 17 Jul 2021 18:43:28 +0200

zld: fix incorrect global symbol collision check

Diffstat:
Msrc/link/MachO/Zld.zig | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/link/MachO/Zld.zig b/src/link/MachO/Zld.zig @@ -1489,8 +1489,8 @@ fn resolveSymbolsInObject(self: *Zld, object_id: u16) !void { .global => { const global = &self.globals.items[resolv.where_index]; - if (!(symbolIsWeakDef(sym) and symbolIsPext(sym)) and - !(symbolIsWeakDef(global.*) and symbolIsPext(global.*))) + if (!(symbolIsWeakDef(sym) or symbolIsPext(sym)) and + !(symbolIsWeakDef(global.*) or symbolIsPext(global.*))) { log.err("symbol '{s}' defined multiple times", .{sym_name}); log.err(" first definition in '{s}'", .{self.objects.items[resolv.file].name.?});