mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
hv: further fix to configurable relocatoin
commit ia23549aa915e7dc2c ("build: make relocation-related code configurable") adds CONFIG_RELOC to make relocation configurable This patch corrects the behavior when CONFIG_RELOC is disabled - Don't use "CFLAGS += -fpie" and put back "LDFLAGS += -static" - __emalloc(): forced to allocate exactly the asked address, which is CONFIG_RAM_START
This commit is contained in:
@@ -68,9 +68,9 @@ static uint64_t trampoline_relo_addr(void *addr)
|
||||
return (uint64_t)addr - get_hv_image_delta();
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RELOC
|
||||
void _relocate(void)
|
||||
{
|
||||
#ifdef CONFIG_RELOC
|
||||
struct Elf64_Dyn *dyn;
|
||||
struct Elf64_Rel *start = NULL, *end = NULL;
|
||||
uint64_t delta, size = 0;
|
||||
@@ -136,12 +136,8 @@ void _relocate(void)
|
||||
}
|
||||
start = (struct Elf64_Rel *)((char *)start + size);
|
||||
}
|
||||
}
|
||||
#else
|
||||
void _relocate(void)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
uint64_t read_trampoline_sym(void *sym)
|
||||
{
|
||||
|
Reference in New Issue
Block a user