zld: fix committing stub info into final binary

This commit is contained in:
Jakub Konka 2021-07-17 18:19:32 +02:00
parent 97914d93a9
commit fccac48a55

View File

@ -1267,11 +1267,12 @@ fn writeStubHelperCommon(self: *Zld) !void {
}
};
for (self.stubs.keys()) |key| {
for (self.stubs.keys()) |_, i| {
const index = @intCast(u32, i);
// TODO weak bound pointers
try self.writeLazySymbolPointer(key);
try self.writeStub(key);
try self.writeStubInStubHelper(key);
try self.writeLazySymbolPointer(index);
try self.writeStub(index);
try self.writeStubInStubHelper(index);
}
}