[all-commits] [llvm/llvm-project] 49ec00: [ELF] Fix IRELATIVE addend if the resolver address...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Wed Feb 11 23:56:13 PST 2026
Branch: refs/heads/release/22.x
Home: https://github.com/llvm/llvm-project
Commit: 49ec007666c4feb2602c5103aff09206a3900064
https://github.com/llvm/llvm-project/commit/49ec007666c4feb2602c5103aff09206a3900064
Author: Fangrui Song <i at maskray.me>
Date: 2026-02-12 (Thu, 12 Feb 2026)
Changed paths:
M lld/ELF/Arch/RISCV.cpp
M lld/ELF/Config.h
M lld/ELF/Relocations.cpp
A lld/test/ELF/loongarch-ifunc-nonpreemptible.s
M lld/test/ELF/riscv-ifunc-nonpreemptible.s
Log Message:
-----------
[ELF] Fix IRELATIVE addend if the resolver address is updated by linker relaxation (#179063)
For a non-preemptible ifunc, `handleNonPreemptibleIfunc` creates a
cloned
symbol (`directSym`) to compute the addend of the IRELATIVE dynamic
relocation.
This cloned symbol wasn't tracked by `initSymbolAnchors`, so its value
wasn't adjusted during RISC-V/LoongArch linker relaxation.
This caused IRELATIVE addends to point to pre-relaxation addresses.
Fix this by:
- Tracking cloned IRELATIVE symbols in `ctx.irelativeSyms`
- Adding these symbols to `relaxAux->anchors` in `initSymbolAnchors`
(cherry picked from commit bc45ea2c4f24c259814ed5545c403d09ebf89be6)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list