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

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 12 12:39:01 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: Friday, October 9, 2015 8:45:20 AM
> Subject: Re: [lld] r249760 - [ELF2] Make the system page size a target-dependent property
> 
> > The required page alignment is different on different targets. On
> > PowerPC, for
> > example, we need 64K pages (the loader won't set different
> > permissions on a
> > finer granularity than that). I've set the existing targets to what
> > I believe
> > to be the correct values, and have updated the regression tests
> > accordingly.
> 
> Can you make this a comment is the code? For someone reading it now
> it
> would look like a bug since the hardware itself uses 4k pages, no?

I added a comment in r250087. To be honest, I don't understand myself why this is necessary, as I agree the underlying system page size is smaller, but experimentally, this is certainly necessary to get the loader to set the memory permissions correctly. Also, this matches what ld.gold does.

Thanks again,
Hal

> 
> Cheers,
> Rafael
> 

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


More information about the llvm-commits mailing list