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

Igor Kudrin via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 18 09:44:10 PST 2015


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.

Regards,
Igor
18 нояб. 2015 г. 22:57 пользователь "Davide Italiano" <davide at freebsd.org>
написал:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151118/304b1026/attachment.html>


More information about the llvm-commits mailing list