From 2aed0c7aa1a6309e3d6510d2ac31a9afc5452845 Mon Sep 17 00:00:00 2001 From: "Gao, Shiqing" Date: Wed, 3 Jul 2024 10:32:45 +0800 Subject: [PATCH] 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 --- hypervisor/boot/reloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hypervisor/boot/reloc.c b/hypervisor/boot/reloc.c index b05dd116c..1df75b7bd 100644 --- a/hypervisor/boot/reloc.c +++ b/hypervisor/boot/reloc.c @@ -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)