[PATCH] D72892: [MC][ARM] Resolve some pcrel fixups at assembly time

Peter Smith via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 05:31:17 PST 2020


psmith added a comment.
Herald added a subscriber: danielkiss.

In D72892#1903386 <https://reviews.llvm.org/D72892#1903386>, @efriedma wrote:

> Emitting the relocations seems conceptually sound: the cases that make sense work, and the linker emits a reasonable error for the cases that don't.  My concern is that the user is likely to get a weird error message if they use a non-lld linker. What do GNU linkers print?


In a shared object with a global preemptible definition of X, ld.bfd will resolve the adr and ldr relocations with respect to X, and not any PLT or GOT entry for X. If X is in range this will be the same behaviour as if the assembler resolves the relocation. If X is too far away there will be an out of range error. A disadvantage of emitting a relocation is that instead of a cryptic assembler error message, we get a relocation out of range error message. This isn't ideal as the error is delayed to link time.

Apologies for the delay in responding.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72892/new/

https://reviews.llvm.org/D72892





More information about the llvm-commits mailing list