After the merge of
commit
cf8cc65cb0ae ("plat/kvm/x86: Make SMP init code resolve its own `start16` relocations")
SMP builds that were not built with `libukreloc` would fail due to
external references to `x86_start16_*` symbols no longer being declared.
Thus, fix this by making their declaration present regardless of
`CONFIG_LIBUKRELOC` being enabled or not. Furthermore, guard the no
longer necessary `START16_UKRELOC_*` macro's, as they are not needed
if the previously mentioned configuration is not enabled.
Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1037
#include <string.h>
#include <errno.h>
-#if CONFIG_LIBUKRELOC
#include "start16_helpers.h"
-#endif /* CONFIG_LIBUKRELOC */
__lcpuid lcpu_arch_id(void)
{
#define X86_START16_SIZE \
((__uptr)x86_start16_end - (__uptr)x86_start16_begin)
+#if CONFIG_LIBUKRELOC
#define START16_UKRELOC_MOV_SYM(sym, sz) \
sym##_uk_reloc_imm##sz##_start16
UKRELOC_ENTRY(START16_UKRELOC_##type##_OFF(sym, sz), \
(void *)sym - (void *)x86_start16_begin, \
sz, UKRELOC_FLAGS_PHYS_REL)
+#endif /* CONFIG_LIBUKRELOC */
#endif /* __START16_HELPERS_H__ */