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

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 3 09:40:13 PST 2020


efriedma added a comment.

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?

Carving out an exception for ldr/adr is inconsistent at a theoretical level.  I'm weakly opposed to this because exceptions make it harder for users to understand the rules.  But realistically, I don't think it's likely to cause practical problems: anyone who's writing ARM assembly should be aware that ldr/adr have a very limited range.

If we decide we should in fact reject the construct, we can and should improve the diagnostics.


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