llvm-project
6d916955 - [ELF] Add target-specific relocation scanning for Hexagon (#181596)

Commit
28 days ago
[ELF] Add target-specific relocation scanning for Hexagon (#181596) Implement Hexagon::scanSectionImpl, following the pattern established for x86 (#178846) and PPC64. This merges the getRelExpr and TLS handling for SHF_ALLOC sections into the target-specific scanner, enabling devirtualization and eliminating abstraction overhead. - Inline relocation classification into scanSectionImpl with a switch on relocation type, replacing the generic rs.scan() path. - Use processR_PC/processR_PLT_PC for common PC-relative and PLT relocations. - Handle GD PLT relocations inline, always setting NEEDS_PLT. Remove the R_HEX_GD_PLT special case from process(). - Handle TLS IE, GD GOT, and TPREL directly, bypassing handleTlsRelocation. Remove EM_HEXAGON from the execOptimize check. - Simplify getRelExpr to only handle relocations needed by relocateNonAlloc and scanEhSection.
Author
Parents
Loading