[PATCH] D87381: [LLD][PowerPC][test] Add test cases for all pc-rel based stubs when the offset not fit in 34 bits

Victor Huang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 09:14:57 PDT 2020


NeHuang marked 3 inline comments as done.
NeHuang added inline comments.


================
Comment at: lld/ELF/Thunks.cpp:913
   if (!isInt<34>(offset))
-    fatal("offset must fit in 34 bits to encode in the instruction");
+    fatal("offset overflow 34 bits, please compile using the large code model");
   uint64_t paddi = PADDI_R12_NO_DISP | (((offset >> 16) & 0x3ffff) << 32) |
----------------
MaskRay wrote:
> NeHuang wrote:
> > MaskRay wrote:
> > > We have an existing diagnostic like
> > > 
> > > `error: relocation R_AARCH64_ABS32 cannot be used against symbol hidden; recompile with -fPIC`
> > Just want to clarify, are you suggesting to follow the same error message print format as `error: relocation R_AARCH64_ABS32 cannot be used against symbol hidden; recompile with -fPIC` ? 
> I mean to make the diagnostic closer with existing styles if possible.
> 
> For this particular one, the second sentence is probably "; recompile with -mcmodel=large"
Thanks. Based on Sean's comment in https://reviews.llvm.org/D86706, I would change the second sentence to "; recompile using the large code model".



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87381



More information about the llvm-commits mailing list