hv: reloc: enclose elf64_r_type() with #ifdef CONFIG_RELOC

elf64_r_type() is only invoked when CONFIG_RELOC is defined.
This patch encloses its definition with `#ifdef CONFIG_RELOC`,
otherwise, it is dead code.

Tracked-On: #861

Signed-off-by: Gao, Shiqing <shiqing.gao@intel.com>
This commit is contained in:
Gao, Shiqing 2024-07-03 10:32:45 +08:00 committed by acrnsi-robot
parent f398b9c29e
commit 2aed0c7aa1

View File

@ -26,12 +26,12 @@ struct Elf64_Rel {
uint64_t r_info;
uint64_t reserved;
};
#endif
static inline uint64_t elf64_r_type(uint64_t i)
{
return (i & 0xffffffffUL);
}
#endif
/* get the delta between CONFIG_HV_RAM_START and the actual load address */
uint64_t get_hv_image_delta(void)