diff options
| author | Jakub Konka <kubkon@jakubkonka.com> | 2023-03-28 19:27:05 +0200 |
|---|---|---|
| committer | Jakub Konka <kubkon@jakubkonka.com> | 2023-03-28 19:27:05 +0200 |
| commit | 25f3175217dace219af643bce7bd28913a970362 (patch) | |
| tree | bde52f03052e390f398cf382c15051c3917d5157 /src/link/Coff | |
| parent | 004f32e79d61cb549b6cf71499138db0df56e152 (diff) | |
| download | zig-25f3175217dace219af643bce7bd28913a970362.tar.gz zig-25f3175217dace219af643bce7bd28913a970362.zip | |
coff: use ArrayHashMap if we are iterating over keys
Diffstat (limited to 'src/link/Coff')
| -rw-r--r-- | src/link/Coff/Atom.zig | 4 | ||||
| -rw-r--r-- | src/link/Coff/Relocation.zig | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/link/Coff/Atom.zig b/src/link/Coff/Atom.zig index 80c04a8fa1..4afc1f7cb2 100644 --- a/src/link/Coff/Atom.zig +++ b/src/link/Coff/Atom.zig @@ -121,8 +121,8 @@ pub fn addBaseRelocation(coff_file: *Coff, atom_index: Index, offset: u32) !void pub fn freeRelocations(coff_file: *Coff, atom_index: Index) void { const gpa = coff_file.base.allocator; - var removed_relocs = coff_file.relocs.fetchRemove(atom_index); + var removed_relocs = coff_file.relocs.fetchOrderedRemove(atom_index); if (removed_relocs) |*relocs| relocs.value.deinit(gpa); - var removed_base_relocs = coff_file.base_relocs.fetchRemove(atom_index); + var removed_base_relocs = coff_file.base_relocs.fetchOrderedRemove(atom_index); if (removed_base_relocs) |*base_relocs| base_relocs.value.deinit(gpa); } diff --git a/src/link/Coff/Relocation.zig b/src/link/Coff/Relocation.zig index c0fd5562e4..4e2f772524 100644 --- a/src/link/Coff/Relocation.zig +++ b/src/link/Coff/Relocation.zig @@ -72,7 +72,7 @@ pub fn getTargetAddress(self: Relocation, coff_file: *const Coff) ?u32 { } } -pub fn resolve(self: *Relocation, atom_index: Atom.Index, code: []u8, coff_file: *Coff) void { +pub fn resolve(self: Relocation, atom_index: Atom.Index, code: []u8, coff_file: *Coff) void { const atom = coff_file.getAtom(atom_index); const source_sym = atom.getSymbol(coff_file); const source_vaddr = source_sym.value + self.offset; |
