| ... | ... | @@ -168,12 +168,13 @@ fn relocationValue(atom: Atom, relocation: types.Relocation, wasm_bin: *const Wa |
| 168 | 168 | .R_WASM_TABLE_INDEX_SLEB, |
| 169 | 169 | .R_WASM_TABLE_INDEX_SLEB64, |
| 170 | 170 | => return wasm_bin.function_table.get(target_loc) orelse 0, |
| 171 | | .R_WASM_TYPE_INDEX_LEB => return blk: { |
| 172 | | if (symbol.isUndefined()) { |
| 173 | | const imp = wasm_bin.imports.get(target_loc).?; |
| 174 | | break :blk imp.kind.function; |
| 175 | | } |
| 176 | | break :blk wasm_bin.functions.values()[symbol.index - wasm_bin.imported_functions_count].type_index; |
| 171 | .R_WASM_TYPE_INDEX_LEB => { |
| 172 | const file_index = atom.file orelse { |
| 173 | return relocation.index; |
| 174 | }; |
| 175 | |
| 176 | const original_type = wasm_bin.objects.items[file_index].func_types[relocation.index]; |
| 177 | return wasm_bin.getTypeIndex(original_type).?; |
| 177 | 178 | }, |
| 178 | 179 | .R_WASM_GLOBAL_INDEX_I32, |
| 179 | 180 | .R_WASM_GLOBAL_INDEX_LEB, |