Skip to content

lld incorrectly calculates the maximum range of R_HEX_B22_PCREL relocation #116798

Closed
@androm3da

Description

@androm3da

When building the linux kernel, we see the following link error:

ld.lld: error: vmlinux.a(arch/hexagon/kernel/head.o):(.init.text+0x160):
relocation R_HEX_B22_PCREL out of range: 2098032 is not in [-2097152, 2097151]; references 'memset'

This issue was triggered by changes in layout but it uncovered an error in the way lld calculates the range of this relocation.

See also https://lore.kernel.org/linux-hexagon/20241114171834.GA1956005@thelio-3990X

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions