[lld] r249760 - [ELF2] Make the system page size a target-dependent property

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 9 06:57:05 PDT 2015


I was taking a look at the code, and it seems easy to put interp and notes
on the first page. I'll try.

On Fri, Oct 9, 2015 at 6:12 AM, Ed Maste via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On 8 October 2015 at 18:23, Hal Finkel via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
> > Modified: lld/trunk/ELF/Writer.cpp
> > URL:
> http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=249760&r1=249759&r2=249760&view=diff
> >
> ==============================================================================
> > --- lld/trunk/ELF/Writer.cpp (original)
> > +++ lld/trunk/ELF/Writer.cpp Thu Oct  8 17:23:54 2015
> > @@ -484,8 +482,8 @@ template <class ELFT> void Writer<ELFT>:
> >
> >    // Reserve space for PHDRs.
> >    ProgramHeaderOff = FileOff;
> > -  FileOff = RoundUpToAlignment(FileOff, PageSize);
> > -  VA = RoundUpToAlignment(VA, PageSize);
> > +  FileOff = RoundUpToAlignment(FileOff, Target->getPageSize());
> > +  VA = RoundUpToAlignment(VA, Target->getPageSize());
> >
> >    if (needsInterpSection())
> >      PHDRs.push_back(&InterpPHDR);
>
> Rounding up to a page here is one of the issues affecting LLD on
> FreeBSD that I posted about a couple of days ago (although it predates
> the change quoted above from r249760).  Rounding up puts the PT_INTERP
> and ELF ABI notes outside of the first page.
>
> As a local hack I changed it to round up to 512 to continue
> investigating other FreeBSD issues and that's sufficient for me to get
> further, but we need to be more clever than just reserving the first
> page for the PHDRs.
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151009/98b6f925/attachment.html>


More information about the llvm-commits mailing list