[lld] r253352 - [ELF2/AArch64] Add lazy relocation support for AArch64.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 08:57:02 PST 2015


On Wed, Nov 18, 2015 at 5:15 AM, Igor Kudrin <ikudrin.dev at gmail.com> wrote:
> Hi,
>
> I guess, there could be some global symbols with R_AARCH64_ADR_PREL_PG_HI21
> relocation types.
> Could you please send me an output of 'readelf -rs try'?
>
> Thanks!
>
You can find the output here:
http://people.freebsd.org/~davide/llvm/aarch64_reloc_unresolved.txt

FWIW, I'm also running with the following local patch (which I plan to
commit after I write a testcase), otherwise linking will fail because
of an unresolved relocation:

diff --git a/ELF/Target.cpp b/ELF/Target.cpp
index 4a8dc9f..cfbc1f2 100644
--- a/ELF/Target.cpp
+++ b/ELF/Target.cpp
@@ -742,6 +742,10 @@ void AArch64TargetInfo::relocateOne(uint8_t *Loc,
uint8_t *BufEnd,
     or32le(Loc, (X & 0x0FFFFFFC) >> 2);
     break;
   }
+  case R_AARCH64_LDST8_ABS_LO12_NC:
+    // No overflow check needed.
+    or32le(Loc, (SA & 0xFFF) << 10);
+    break;
   case R_AARCH64_LDST64_ABS_LO12_NC:
     // No overflow check needed.
     or32le(Loc, (SA & 0xFF8) << 7);


-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list