commit 8d06d8dca214eb9a07d1cc0f67374cdf35031db0 (tree)
parent 938efe4aab09b5806cd3e9903619b95a5f122f36
Author: Bingwu Zhang <xtex@aosc.io>
Date: Sat, 7 Jun 2025 23:23:20 +0800
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
Diffstat:
1 file changed, 0 insertions(+), 1 deletion(-)
diff --git a/src/link/Elf/relocatable.zig b/src/link/Elf/relocatable.zig
@@ -383,7 +383,6 @@ fn writeSyntheticSections(elf_file: *Elf) !void {
const SortRelocs = struct {
pub fn lessThan(ctx: void, lhs: elf.Elf64_Rela, rhs: elf.Elf64_Rela) bool {
_ = ctx;
- assert(lhs.r_offset != rhs.r_offset);
return lhs.r_offset < rhs.r_offset;
}
};