Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 17:55, Roy Franz wrote: > On Fri, Oct 10, 2014 at 3:37 AM, Ard Biesheuvel > wrote: >> On 10 October 2014 12:33, Mark Rutland wrote: >>> Hi Ard, >>> >>> On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: Position independent AArch64 code needs to be linked and

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Roy Franz
On Fri, Oct 10, 2014 at 3:37 AM, Ard Biesheuvel wrote: > On 10 October 2014 12:33, Mark Rutland wrote: >> Hi Ard, >> >> On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: >>> Position independent AArch64 code needs to be linked and loaded at the same >>> relative offset from a 4 KB b

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Mark Rutland
On Fri, Oct 10, 2014 at 03:50:49PM +0100, Ard Biesheuvel wrote: > On 10 October 2014 16:09, Mark Rutland wrote: > > On Fri, Oct 10, 2014 at 11:37:03AM +0100, Ard Biesheuvel wrote: > >> On 10 October 2014 12:33, Mark Rutland wrote: > >> > Hi Ard, > >> > > >> > On Fri, Oct 10, 2014 at 10:25:24AM +0

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 16:09, Mark Rutland wrote: > On Fri, Oct 10, 2014 at 11:37:03AM +0100, Ard Biesheuvel wrote: >> On 10 October 2014 12:33, Mark Rutland wrote: >> > Hi Ard, >> > >> > On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: >> >> Position independent AArch64 code needs to

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Mark Rutland
On Fri, Oct 10, 2014 at 11:37:03AM +0100, Ard Biesheuvel wrote: > On 10 October 2014 12:33, Mark Rutland wrote: > > Hi Ard, > > > > On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: > >> Position independent AArch64 code needs to be linked and loaded at the same > >> relative offset

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
On 10 October 2014 12:33, Mark Rutland wrote: > Hi Ard, > > On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: >> Position independent AArch64 code needs to be linked and loaded at the same >> relative offset from a 4 KB boundary, or adrp/add and adrp/ldr pairs will >> not work correc

Re: [PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Mark Rutland
Hi Ard, On Fri, Oct 10, 2014 at 10:25:24AM +0100, Ard Biesheuvel wrote: > Position independent AArch64 code needs to be linked and loaded at the same > relative offset from a 4 KB boundary, or adrp/add and adrp/ldr pairs will > not work correctly. (This is how PC relative symbol references with a

[PATCH] arm64/efi: set PE/COFF section alignment to 4 KB

2014-10-10 Thread Ard Biesheuvel
Position independent AArch64 code needs to be linked and loaded at the same relative offset from a 4 KB boundary, or adrp/add and adrp/ldr pairs will not work correctly. (This is how PC relative symbol references with a 4 GB reach are emitted) We need to declare this in the PE/COFF header, otherwi