Skip to content

Commit

Permalink
hv: reloc: enclose elf64_r_type() with #ifdef CONFIG_RELOC
Browse files Browse the repository at this point in the history
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: projectacrn#861

Signed-off-by: Gao, Shiqing <[email protected]>
  • Loading branch information
shiqingg authored and acrnsi-robot committed Jul 3, 2024
1 parent f398b9c commit 2aed0c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hypervisor/boot/reloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2aed0c7

Please sign in to comment.