mirror of
https://github.com/ziglang/zig.git
synced 2026-02-13 12:59:04 +00:00
elf: scan LinkerDefined obj for symbol indirection too
This commit is contained in:
parent
137d43c0ea
commit
0a198789f1
@ -2021,11 +2021,6 @@ fn scanRelocs(self: *Elf) !void {
|
||||
undefs.deinit();
|
||||
}
|
||||
|
||||
var objects = try std.ArrayList(File.Index).initCapacity(gpa, self.objects.items.len + 1);
|
||||
defer objects.deinit();
|
||||
if (self.zigObjectPtr()) |zo| objects.appendAssumeCapacity(zo.index);
|
||||
objects.appendSliceAssumeCapacity(self.objects.items);
|
||||
|
||||
var has_reloc_errors = false;
|
||||
if (self.zigObjectPtr()) |zo| {
|
||||
zo.asFile().scanRelocs(self, &undefs) catch |err| switch (err) {
|
||||
@ -2063,6 +2058,9 @@ fn scanRelocs(self: *Elf) !void {
|
||||
for (self.shared_objects.items) |index| {
|
||||
try self.file(index).?.createSymbolIndirection(self);
|
||||
}
|
||||
if (self.linkerDefinedPtr()) |obj| {
|
||||
try obj.asFile().createSymbolIndirection(self);
|
||||
}
|
||||
if (self.got.flags.needs_tlsld) {
|
||||
log.debug("program needs TLSLD", .{});
|
||||
try self.got.addTlsLdSymbol(self);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user