HV: build: make relocation-related code configurable

The relocation feature relies on the ld option "-z noreloc-overflow" which is
only available for binutils >= 2.27, while on Ubuntu 16.04 or older the default
version of binutils is 2.26.

This patch wraps the relocation code with a configurable macro and make it
undefined by default to avoid default build failures.

NOTE: This is just a hotfix. The code dropped with undefined CONFIG_RELOC needs
to be reviewed by the original author of this feature. Checks to the binutils
version will also follow up.

Signed-off-by: Junjie Mao <junjie.mao@intel.com>
This commit is contained in:
Junjie Mao
2018-07-11 19:47:54 +08:00
committed by Jack Ren
parent 057a384f8e
commit a23549aa91
3 changed files with 12 additions and 0 deletions

View File

@@ -123,3 +123,7 @@ config UEFI_OS_LOADER_NAME
config MTRR_ENABLED
bool
default y
config RELOC
bool "Enable relocation"
default n