Commit Graph

2 Commits

Author SHA1 Message Date
Fangrui Song 20b4704da3 [ELF] reportRangeError: mention symbol name for non-STT_SECTION local symbols like non-global symbols 2021-12-25 23:46:47 -08:00
Ard Biesheuvel da66263b6e [ARM] implement support for ALU/LDR PC-relative group relocations
Currently, LLD does not support the complete set of ARM group relocations.
Given that I intend to start using these in the Linux kernel [0], let's add
support for these.

This implements the group processing as documented in the ELF psABI. Notably,
this means support is dropped for very far symbol references that also carry a
small component, where the immediate is rotated in such a way that only part of
it wraps to the other end of the 32-bit word. To me, it seems unlikely that
this is something anyone could be relying on, but of course I could be wrong.

[0] https://lore.kernel.org/r/20211122092816.2865873-8-ardb@kernel.org/

Reviewed By: peter.smith, MaskRay

Differential Revision: https://reviews.llvm.org/D114172
2021-11-27 10:26:37 +01:00