On 10 September 2015 at 11:32, Gao, Liming <[email protected]> wrote:
> Ard:
>   Does GenFw tool patch impact X86 arch?
>

No, it does not.

Patch #1 just removes some dead code from Elf64Convert.c (since EM_ARM
is only used for 32 bit code)

Patch #2 changes three things in Elf32Convert.c:
a) it removes a special case for EM_ARM
b) it changes the handling of some ARM/RVCT specific condition from
giving an error to working around it
c) it adds a sanity check to some ARM specific relative relocations

Since 2a makes it more likely that ARM/RVCT users will see the error
in 2b, the work around is added. Since the workaround may affect ARM
relative symbol references, the sanity check in 2c is added.

For IA32 users, there is no change.

-- 
Ard.



> -----Original Message-----
> From: edk2-devel [mailto:[email protected]] On Behalf Of Ard 
> Biesheuvel
> Sent: Thursday, September 10, 2015 4:55 PM
> To: [email protected]; [email protected]; Liu, Yingke D
> Cc: [email protected]; [email protected]; Gao, Liming; Ard Biesheuvel
> Subject: [edk2] [PATCH v3 0/4] enable Properties Table mem protection for ARM
>
> This series implements 4 KB section alignment for ARM, which is required for 
> supporting the Properties Table memory protection feature on this 
> architecture.
>
> Patch #1 is a simple cleanup from the copy/paste that created Elf64Convert.c
>
> Patch #2 changes the PE/COFF .data alignment to adhere to the global section 
> and file alignment. Not doing so means the resulting binary violates the 
> PE/COFF spec, but special care is needed to correctly handle ARM RVCT 
> generated ELF binaries which rely on the misalignment of some sections being 
> preserved.
>
> NOTE: this patch adds some special handling to the ELF input sections, but 
> only to a case that was formerly flagged as an error (i.e., section is 
> misaligned wrt its own alignment). This means the risk for regressions is 
> minimal, except for RVCT users.
>
> Patch #3 switches to the new GCC linker scripts for ARM
>
> Patch #4 sets the 4 KB alignment linker command line option to ensure .text 
> and .data can be represented by separate memory regions, allowing their 
> permissions to be set to R-X and RW- respectively.
>
> Changes since v2:
> - removed one additional instance of the RVCT check in #1
> - added Michael's Tested-by to all patches except #1 (since he tested 32-bit 
> ARM
>   only)
> - fixed the RVCT case in patch #2 (untested on RVCT)
>
> Changes since v1:
> - rebased onto latest GCC linker script changes
> - added Laszlo's ack to #4
>
> Ard Biesheuvel (4):
>   BaseTools/GenFw: remove ARM and RVCT references from ELF64 code
>   BaseTools/GenFw: make ARM's .data adhere to PE/COFF section alignment
>   BaseTools/ARM: move to unified GCC linker script
>   ArmVirtPkg: use 4 KB section alignment for ARM DXE_RUNTIME modules
>
>  ArmVirtPkg/ArmVirt.dsc.inc              |  3 +-
>  BaseTools/Conf/tools_def.template       | 12 +++-
>  BaseTools/Source/C/GenFw/Elf32Convert.c | 67 +++++++++++++-------  
> BaseTools/Source/C/GenFw/Elf64Convert.c | 23 +------
>  4 files changed, 56 insertions(+), 49 deletions(-)
>
> --
> 1.9.1
>
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
> _______________________________________________
> edk2-devel mailing list
> [email protected]
> https://lists.01.org/mailman/listinfo/edk2-devel
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to