authorgravatar for xtex@astrafall.orgxtex <xtex@astrafall.org> 2025-06-07 23:23:20+08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-08 04:53:16+01:00
log8d06d8dca214eb9a07d1cc0f67374cdf35031db0
tree9ff099962dc84d260e7c7897342aa36d3c4d77ba
parent938efe4aab09b5806cd3e9903619b95a5f122f36

link.Elf: allow multiple relocs at the same location

RISC-V and LoongArch ELF psABIs define a kind of RELAX relocations which are expected to have a normal relocation at the same address. Change-Id: I5737bfcfd3e5041fb6ab7d193c9fc57eeca1eec8

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

src/link/Elf/relocatable.zig-1
...@@ -383,7 +383,6 @@ fn writeSyntheticSections(elf_file: *Elf) !void {...@@ -383,7 +383,6 @@ fn writeSyntheticSections(elf_file: *Elf) !void {
383 const SortRelocs = struct {383 const SortRelocs = struct {
384 pub fn lessThan(ctx: void, lhs: elf.Elf64_Rela, rhs: elf.Elf64_Rela) bool {384 pub fn lessThan(ctx: void, lhs: elf.Elf64_Rela, rhs: elf.Elf64_Rela) bool {
385 _ = ctx;385 _ = ctx;
386 assert(lhs.r_offset != rhs.r_offset);
387 return lhs.r_offset < rhs.r_offset;386 return lhs.r_offset < rhs.r_offset;
388 }387 }
389 };388 };