[lld] r250101 - [ELF2] Add a base set of PPC64 relocations

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 14 23:46:50 PDT 2015


----- Original Message -----
> From: "Rafael EspĂ­ndola" <rafael.espindola at gmail.com>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "llvm-commits" <llvm-commits at lists.llvm.org>
> Sent: Wednesday, October 14, 2015 1:47:56 PM
> Subject: Re: [lld] r250101 - [ELF2] Add a base set of PPC64 relocations
> 
> > It looks like gold and bfd have a funny logic as to when a weak
> > undefined shows up in dynamic revocations.
> >
> > Given
> >
> >         .globl _start
> > _start:
> >         .weak sym1
> >         .long sym1 at gotpcrel
> >         .weak sym2
> >         .long sym2 at plt
> >         .weak sym3
> >         .quad sym3
> >
> > There will be relocs for sym1 and sym2, but I cannot understand the
> > logic. If the dynamic linker must get a chance to look for sym1 and
> > sym2, it must also get one for sym3.
> 
> And it looks like the answer is that there is no reasonable way to
> solve it when a got is not used.
> 
> r250311 implements what I think is the correct behavior. With that
> you
> should be able to remove the extra "(S.isUndefined() && S.isWeak())"
> in the ppc code. Let me know if anything is missing.

This does appear to work, thanks! r250372.

 -Hal

> 
> Thanks,
> Rafael
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory


More information about the llvm-commits mailing list