| ... | @@ -111,13 +111,3 @@ pub fn addBaseRelocation(self: *Atom, coff_file: *Coff, offset: u32) !void { | ... | @@ -111,13 +111,3 @@ pub fn addBaseRelocation(self: *Atom, coff_file: *Coff, offset: u32) !void { |
| 111 | } | 111 | } |
| 112 | try gop.value_ptr.append(gpa, offset); | 112 | try gop.value_ptr.append(gpa, offset); |
| 113 | } | 113 | } |
| 114 | | | |
| 115 | pub fn addBinding(self: *Atom, coff_file: *Coff, target: SymbolWithLoc) !void { | | |
| 116 | const gpa = coff_file.base.allocator; | | |
| 117 | log.debug(" (adding binding to target %{d} in %{d})", .{ target.sym_index, self.sym_index }); | | |
| 118 | const gop = try coff_file.bindings.getOrPut(gpa, self); | | |
| 119 | if (!gop.found_existing) { | | |
| 120 | gop.value_ptr.* = .{}; | | |
| 121 | } | | |
| 122 | try gop.value_ptr.append(gpa, target); | | |
| 123 | } | | |