authorgravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-05-07 11:42:38+01:00
committergravatar for mlugg@mlugg.co.ukMatthew Lugg <mlugg@mlugg.co.uk> 2026-05-17 18:08:58+01:00
log65c3a07709156a721090635ae6e6a16d7ccb95da
treeec330ac4383ee58c6d2853cf4f31fc20b30c18c8
parent2ec0b886a28a6af0bea158e22d766c8f2c294c60
signaturelock-open Commit is signed but in an unrecognized format.

Elf2: don't try to add needed dso in relocatable


1 files changed, 3 insertions(+), 1 deletions(-)

src/link/Elf2.zig+3-1
...@@ -2386,7 +2386,9 @@ fn loadDso(elf: *Elf, path: std.Build.Cache.Path, fr: *Io.File.Reader) !void {...@@ -2386,7 +2386,9 @@ fn loadDso(elf: *Elf, path: std.Build.Cache.Path, fr: *Io.File.Reader) !void {
2386}2386}
2387fn loadDsoExact(elf: *Elf, name: []const u8) !void {2387fn loadDsoExact(elf: *Elf, name: []const u8) !void {
2388 log.debug("loadDsoExact({f})", .{std.zig.fmtString(name)});2388 log.debug("loadDsoExact({f})", .{std.zig.fmtString(name)});
2389 try elf.needed.put(elf.base.comp.gpa, try elf.string(.dynstr, name), {});2389 if (elf.si.dynamic != .null) {
2390 try elf.needed.put(elf.base.comp.gpa, try elf.string(.dynstr, name), {});
2391 }
2390}2392}
23912393
2392/// Validates that the `std.elf.Ident` present at the start of `r` is a compatible link input.2394/// Validates that the `std.elf.Ident` present at the start of `r` is a compatible link input.