[PATCH] D87381: [LLD][PowerPC][test] Add test cases for all pc-rel based stubs when the offset not fit in 34 bits
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 10 16:11:25 PDT 2020
MaskRay 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) |
----------------
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"
================
Comment at: lld/test/ELF/ppc64-pcrel-call-to-toc-error.s:33
+ .long 0
+ .size global, 4
----------------
.size is insignificant and can be deleted.
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