HomePhabricator

[PPC64] Consider localentry offset when computing branch distance

Description

[PPC64] Consider localentry offset when computing branch distance

Summary:
We don't take localentry offset into account, and thus may fail to
create a long branch when the gap is just a few bytes smaller than 2^25.

relocation R_PPC64_REL24 out of range: 33554432 is not in [-33554432, 33554431]
relocation R_PPC64_REL24 out of range: 33554436 is not in [-33554432, 33554431]

Fix that by adding the offset to the symbol VA.

Differential Revision: https://reviews.llvm.org/D61058

Details

Committed
MaskRayApr 24 2019, 7:03 AM
Differential Revision
D61058: [PPC64] Consider localentry offset when computing branch distance
Branches
Unknown
Tags
Unknown