]> git.proxmox.com Git - mirror_edk2.git/commit
ArmPkg: add prebuilt glue binaries for GCC5 LTO support
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Mon, 18 Jul 2016 10:19:34 +0000 (12:19 +0200)
committerArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 2 Aug 2016 08:53:57 +0000 (10:53 +0200)
commite1458aaded8e34b0c74c1a17ac1dc3765d97c082
tree17018870aaa74ac762ad1f4acb0c5394427f3118
parenta1b8baccc30ba7c3911359e271b0e0a3ef56d501
ArmPkg: add prebuilt glue binaries for GCC5 LTO support

GCC in LTO mode interoperates poorly with non-standard libraries that
provide implementations of compiler intrinsics such as memcpy/memset
or the stack protector entry points. Such libraries need to be built
in non-LTO mode, and then referenced explicitly on the linker command
line using a -plugin-opt=-pass-through=-lxxx linker option.

However, if these intrinsics are also referenced directly, the LTO
version of the code will be pulled in, and will happily satisfy all
other references to the same symbol.

So add a pair of glue libraries, for ARM and AARCH64, that reference
the known intrinsics. Since the binaries live under ArmPkg directly,
we can reference them in tools_def.txt. Under LD garbage collection,
the object itself will be pruned, and so will the intrinsics that end
up unused by the module.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
ArmPkg/Library/GccLto/liblto-aarch64.a [new file with mode: 0644]
ArmPkg/Library/GccLto/liblto-aarch64.s [new file with mode: 0644]
ArmPkg/Library/GccLto/liblto-arm.a [new file with mode: 0644]
ArmPkg/Library/GccLto/liblto-arm.s [new file with mode: 0644]