Commit d8c4838c7d

Jakub Konka <kubkon@jakubkonka.com>
2021-07-17 18:43:28
zld: fix incorrect global symbol collision check
1 parent 9f20a51
Changed files (1)
src
link
MachO
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.?});