| ... | @@ -6223,13 +6223,12 @@ fn flushGlobal(coff: *Coff, gmi: Node.GlobalMapIndex) !bool { | ... | @@ -6223,13 +6223,12 @@ fn flushGlobal(coff: *Coff, gmi: Node.GlobalMapIndex) !bool { |
| 6223 | return true; | 6223 | return true; |
| 6224 | }; | 6224 | }; |
| 6225 | | 6225 | |
| 6226 | const lib_name = import.lib_name.toSlice(coff); | | |
| 6227 | | | |
| 6228 | try coff.nodes.ensureUnusedCapacity(gpa, 4); | 6226 | try coff.nodes.ensureUnusedCapacity(gpa, 4); |
| 6229 | try coff.symbols.ensureUnusedCapacity(gpa, 2); | 6227 | try coff.symbols.ensureUnusedCapacity(gpa, 2); |
| 6230 | | 6228 | |
| 6231 | const target_endian = coff.targetEndian(); | 6229 | const target_endian = coff.targetEndian(); |
| 6232 | const addr_info = coff.targetAddrInfo(); | 6230 | const addr_info = coff.targetAddrInfo(); |
| | 6231 | const lib_name = import.lib_name.toSlice(coff); |
| 6233 | const gop = try coff.import_table.entries.getOrPutAdapted( | 6232 | const gop = try coff.import_table.entries.getOrPutAdapted( |
| 6234 | gpa, | 6233 | gpa, |
| 6235 | lib_name, | 6234 | lib_name, |
| ... | @@ -6380,7 +6379,6 @@ fn flushGlobal(coff: *Coff, gmi: Node.GlobalMapIndex) !bool { | ... | @@ -6380,7 +6379,6 @@ fn flushGlobal(coff: *Coff, gmi: Node.GlobalMapIndex) !bool { |
| 6380 | sym.section_number = iat_sym.section_number; | 6379 | sym.section_number = iat_sym.section_number; |
| 6381 | sym.ni = iat_sym.ni; | 6380 | sym.ni = iat_sym.ni; |
| 6382 | sym.setValue(.{ .node_offset = iat_offset }); | 6381 | sym.setValue(.{ .node_offset = iat_offset }); |
| 6383 | si.flushMoved(coff); | | |
| 6384 | (try gop.value_ptr.import_address_table_symbols.addOne(gpa)).* = si; | 6382 | (try gop.value_ptr.import_address_table_symbols.addOne(gpa)).* = si; |
| 6385 | }, | 6383 | }, |
| 6386 | .thunk => { | 6384 | .thunk => { |
| ... | @@ -6424,11 +6422,10 @@ fn flushGlobal(coff: *Coff, gmi: Node.GlobalMapIndex) !bool { | ... | @@ -6424,11 +6422,10 @@ fn flushGlobal(coff: *Coff, gmi: Node.GlobalMapIndex) !bool { |
| 6424 | }, | 6422 | }, |
| 6425 | } | 6423 | } |
| 6426 | coff.nodes.appendAssumeCapacity(.{ .import_thunk = gmi }); | 6424 | coff.nodes.appendAssumeCapacity(.{ .import_thunk = gmi }); |
| 6427 | sym.rva = coff.computeNodeRva(sym.ni); | | |
| 6428 | si.applyLocationRelocs(coff); | | |
| 6429 | }, | 6425 | }, |
| 6430 | } | 6426 | } |
| 6431 | | 6427 | |
| | 6428 | si.flushMoved(coff); |
| 6432 | return true; | 6429 | return true; |
| 6433 | } | 6430 | } |
| 6434 | | 6431 | |