BaseTools: Add missing Elf relocation type for LTO build

Add support to convert missing Elf relocation types
(R_X86_64_PLT32, R_X86_64_GOTPCREL, R_X86_64_REX_GOTPCRELX)
to PeCoff, which are required by LTO image.

These changes are necessary to unbreak sysutils/uefi-edk2-bhyve on
FreeBSD after the update of devel/binutils to version 2.31.1.

Special thanks to bap@FreeBSD.org to help me debug and find a
solution for this issue.

Reported by:	many
Obtained from:	86e401fd47
This commit is contained in:
Marcelo Araujo 2019-01-28 06:07:18 +00:00
parent d9121093b3
commit d450d456e4
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=491454
2 changed files with 7 additions and 5 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= uefi-edk2-bhyve
DISTVERSIONPREFIX= v
DISTVERSION= 0.2
PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= sysutils
@ -11,6 +12,8 @@ COMMENT?= UEFI-EDK2 firmware for bhyve
LICENSE= BSD2CLAUSE
ONLY_FOR_ARCHS= amd64
BUILD_DEPENDS= bash:shells/bash \
nasm:devel/nasm \
${PYTHON_LIBDIR}/lib-dynload/_sqlite3.so:databases/py-sqlite3@${PY_FLAVOR}
@ -21,11 +24,10 @@ USE_GCC= 4.8
USE_GITHUB= yes
GH_ACCOUNT= freebsd
GH_PROJECT= uefi-edk2
GH_TAGNAME= aa8d718
PLIST_FILES= ${PREFIX}/share/uefi-firmware/BHYVE_UEFI${PLIST_SUFFIX}.fd
ONLY_FOR_ARCHS= amd64
OPTIONS_DEFINE= DEBUG
DEBUG_VARS= uefi_target=DEBUG

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1541047623
SHA256 (freebsd-uefi-edk2-v0.2_GH0.tar.gz) = 886c443f9d2deacdfee33c2794d8692c10e65960cdefe0e523babdcb04c386f2
SIZE (freebsd-uefi-edk2-v0.2_GH0.tar.gz) = 30981874
TIMESTAMP = 1548651484
SHA256 (freebsd-uefi-edk2-v0.2-aa8d718_GH0.tar.gz) = 749ef1ec3fdb37434745a7ecf7f3d41e6c84aeb906d52e5f8ce85527a06a472e
SIZE (freebsd-uefi-edk2-v0.2-aa8d718_GH0.tar.gz) = 30986800