]> git.proxmox.com Git - mirror_edk2.git/commit
BaseTools: AArch64: use explicit linker scripts
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 6 Jul 2015 15:57:50 +0000 (15:57 +0000)
committerabiesheuvel <abiesheuvel@Edk2>
Mon, 6 Jul 2015 15:57:50 +0000 (15:57 +0000)
commit64a910f3dac273922bbbe5d4817c2a9a6fd11aa0
treed2eb1214204e06ef6777496c7178b16a250fa1ca
parent228593f9068f745193afefa6a1f0184b5d210880
BaseTools: AArch64: use explicit linker scripts

Instead of relying on the builtin linker script of GNU ld, which
may vary based on binutils version (which is not tightly coupled to
the GCC version) and linker command line options, introduce a linker
script for AArch64 to be used by all GCC/binutils versions.

The script is laid out such that two ELF sections .text and .data are
created that map onto the PE/COFF with the same names. By aligning
.data to the minimum alignment of .text, and by not adding any
additional padding -which is what LD's builtin linker script does- the
relative offset between .text and .data is retained after the PE/COFF
conversion. This should prevent problems with debuggers and other
tooling that are ELF based.

Also provided is an overlay linker script that increases the alignment
of .text and .data to 64 KB. This is intended for DXE_RUNTIME_DRIVER
modules, to make them compatible with the newly introduced
Properties Table feature.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17824 6f19259b-4bc3-4df7-8a09-765794883524
BaseTools/Conf/tools_def.template
BaseTools/Scripts/gcc-aarch64-64K-align-ld-script [new file with mode: 0644]
BaseTools/Scripts/gcc-aarch64-ld-script [new file with mode: 0644]