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

@@ -136,7 +136,7 @@ primary_start_long_mode:
* Notes: this includes the fixup to IDT tables and temporary
* page tables
*/
/*call _relocate*/
call _relocate
/* Load temportary GDT pointer value */
lea cpu_primary32_gdt_ptr(%rip), %rbx