[ELF] Make relocateAlloc target specific. NFC
authorFangrui Song <i@maskray.me>
Mon, 17 Oct 2022 18:01:10 +0000 (11:01 -0700)
committerFangrui Song <i@maskray.me>
Mon, 17 Oct 2022 18:01:11 +0000 (11:01 -0700)
commit685b21255315e699aa839d93fe71b37d806c90c2
tree19809b26ea23dce00973114f09c378269fe451c4
parent5b9597f59a445523bd59b5251ab1c2865e74919f
[ELF] Make relocateAlloc target specific. NFC

The target-specific code (AArch64, PPC64) does not fit into the generic code and
adds virtual function overhead. Move relocateAlloc into ELF/Arch/ instead. This
removes many virtual functions (relaxTls*). In addition, this helps get rid of
getRelocTargetVA dispatch and many RelExpr members in the future.
12 files changed:
lld/ELF/AArch64ErrataFix.cpp
lld/ELF/ARMErrataFix.cpp
lld/ELF/Arch/AArch64.cpp
lld/ELF/Arch/PPC.cpp
lld/ELF/Arch/PPC64.cpp
lld/ELF/Arch/X86.cpp
lld/ELF/Arch/X86_64.cpp
lld/ELF/InputSection.cpp
lld/ELF/InputSection.h
lld/ELF/SyntheticSections.cpp
lld/ELF/Target.cpp
lld/ELF/Target.h