<p dir="ltr">So, we have a global symbol "_end", and a non-GOT relocation which references it. Is it normal for AArch64 or, maybe, FreeBSD-specific? Anyway, it seems like we have to extend the canBePreempted function to add relocation types into analysis. I can prepare the patch tomorrow if you don't add it today.</p>
<p dir="ltr">Regards,<br>
Igor</p>
<div class="gmail_quote">18 нояб. 2015 г. 22:57 пользователь "Davide Italiano" <<a href="mailto:davide@freebsd.org">davide@freebsd.org</a>> написал:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Nov 18, 2015 at 5:15 AM, Igor Kudrin <<a href="mailto:ikudrin.dev@gmail.com">ikudrin.dev@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> I guess, there could be some global symbols with R_AARCH64_ADR_PREL_PG_HI21<br>
> relocation types.<br>
> Could you please send me an output of 'readelf -rs try'?<br>
><br>
> Thanks!<br>
><br>
You can find the output here:<br>
<a href="http://people.freebsd.org/~davide/llvm/aarch64_reloc_unresolved.txt" rel="noreferrer" target="_blank">http://people.freebsd.org/~davide/llvm/aarch64_reloc_unresolved.txt</a><br>
<br>
FWIW, I'm also running with the following local patch (which I plan to<br>
commit after I write a testcase), otherwise linking will fail because<br>
of an unresolved relocation:<br>
<br>
diff --git a/ELF/Target.cpp b/ELF/Target.cpp<br>
index 4a8dc9f..cfbc1f2 100644<br>
--- a/ELF/Target.cpp<br>
+++ b/ELF/Target.cpp<br>
@@ -742,6 +742,10 @@ void AArch64TargetInfo::relocateOne(uint8_t *Loc,<br>
uint8_t *BufEnd,<br>
     or32le(Loc, (X & 0x0FFFFFFC) >> 2);<br>
     break;<br>
   }<br>
+  case R_AARCH64_LDST8_ABS_LO12_NC:<br>
+    // No overflow check needed.<br>
+    or32le(Loc, (SA & 0xFFF) << 10);<br>
+    break;<br>
   case R_AARCH64_LDST64_ABS_LO12_NC:<br>
     // No overflow check needed.<br>
     or32le(Loc, (SA & 0xFF8) << 7);<br>
<br>
<br>
--<br>
Davide<br>
<br>
"There are no solved problems; there are only problems that are more<br>
or less solved" -- Henri Poincare<br>
</blockquote></div>