hv: build hypervisor as PIE (position-independent executable)

Build and link hypervisor with "-pie" and remove static linking so that
it generates .rela sections for relocation

Signed-off-by: Zheng Gen <gen.zheng@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Yin fengwei <fengwei.yin@intel.com>
This commit is contained in:
Zide Chen
2018-06-22 10:25:24 -07:00
committed by lijinxia
parent 92cd2612fc
commit 84d9da1d6a
3 changed files with 17 additions and 2 deletions

View File

@@ -39,6 +39,13 @@ SECTIONS
} > ram
.rela :
{
*(.rela*)
*(.dyn*)
} > ram
. = ALIGN(4) ;
_ld_trampoline_load = .;
.trampoline : AT (_ld_trampoline_load)