Page MenuHomeFreeBSD

llvm: [ELF] Support some absolute/PC-relative relocation types for REL format
AbandonedPublic

Authored by alfredo on Feb 25 2022, 7:06 PM.

Details

Reviewers
dim
fbsd-phab_maskray.me
Group Reviewers
PowerPC
Summary

Support R_PPC_REL32 to fix "ld.lld: error: drti.c:(.SUNW_dof+0x4E4): internal linker error: cannot read addend for relocation R_PPC_REL32" while building perl5.32 for powerpc. Also add some common relocation types for AArch64, PPC, and PPC64.

The patch was taken from https://reviews.llvm.org/D120535 and from LLVM15 to LLVM13 with trivial changes. The issue is a blocker for the upcoming 13.1-RELEASE.

Original patch commited: https://reviews.llvm.org/rG767e64fc11d7734843ec5bb0bd3f7330541bb1a6

If you think it's too risky we can restrict the change to powerpc only.

Test Plan

Build packages on 14-RELEASE and 13-STABLE using the patched in-tree compiler.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 44579
Build 41467: arc lint + arc unit