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:
Zide Chen
2018-07-11 11:18:29 -07:00
committed by lijinxia
parent 944776f238
commit 621425da20
3 changed files with 14 additions and 7 deletions

View File

@@ -268,7 +268,11 @@ EFI_STATUS __emalloc(UINTN size, UINTN min_addr, EFI_PHYSICAL_ADDRESS *addr,
continue;
}
#ifndef CONFIG_RELOC
aligned = start;
#else
aligned = min_addr;
#endif
err = allocate_pages(AllocateAddress, mem_type,
nr_pages, &aligned);
if (err == EFI_SUCCESS) {