[lld] r249752 - Revert: r249728 - Roll back r249726 and r249723 because they broke buildbots.

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


----- Original Message -----
> From: shankare at codeaurora.org
> To: "Rafael Espíndola" <rafael.espindola at gmail.com>
> Cc: "Hal Finkel" <hfinkel at anl.gov>, "llvm-commits" <llvm-commits at lists.llvm.org>
> Sent: Tuesday, October 13, 2015 12:38:21 PM
> Subject: Re: [lld] r249752 - Revert: r249728 - Roll back r249726 and r249723 because they broke buildbots.
> 
> I think the start address of the image, is ABI defined isn't it ? A
> target
> specific way of setting the start address would be necessary IMO.
> 
> >> I had originally thought that they had been causing problems, but
> >> going
> >> back and restoring the original value (but keeping the page-size
> >> fix,
> >> which definitely is necessary), sill produces a working
> >> hello-world
> >> binary. Thus, I don't have a good answer for you, except to say
> >> that
> >> these are the same magic values that ld.gold uses. That having
> >> been
> >> said, I'd prefer to keep them this way. Poking around in the
> >> debugger,
> >> this makes the addresses look more like what I'm used to seeing,
> >> and
> >> FWIW, matching the behavior of existing linkers here seems like a
> >> prudent approach.
> >
> > So, this is a small example of "cargo coding" I would like to
> > avoid.
> >
> > Changing the values only when we actually know why their are needed
> > seems a much better solution. In the X86_64 case that is how we
> > found
> > out what the restrictions actually were and have them documented in
> > a
> > comment.
> >
> > I can see why it has to be 64k aligned on ppc, but the original
> > values was
> > too.
> >
> > Would you mind reverting the getVAStart part until we actually know
> > of
> > a reason why a given architecture has to be different?

Alan Modra @ IBM was kind enough to do some research on my behalf, and binutils has set TEXT_START_ADDR=0x10000000 in elf64ppc.sh since 1999. This was done to implement this suggestion in the PPC64 ELF ABI (http://refspecs.linuxfoundation.org/ELF/ppc64/PPC-elf64abi.html):

  It is normally desirable to put segments with different characteristics in separate 256 Mbyte portions of the address space, to give the operating system full paging flexibility in the 64-bit address space.

And the lowest non-zero 256M boundary is 0x10000000.

As far as I can tell, the POWER* cores only support direct page sizes up to 16M (with 64K being the next-smallest size). The PPC A2 supports 256M indirect pages (pages with sub-pages), and I don't yet know if/how that's relevant.

Thanks again,
Hal

> >
> > Thanks,
> > Rafael
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> >
>  

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


More information about the llvm-commits mailing list