It does not make sense to reference a SHF_ALLOC section from a non-SHF_ALLOC section via R_386_PC16. Conceptually, even if a non-SHF_ALLOC is loaded as part of the memory image, the distance between it and a SHF_ALLOC section may not be a constant, so the linker cannot reasonably resolve the relocation.
GNU ld allows it but lld will warn. Add the SHF_ALLOC flag. Signed-off-by: Fangrui Song <[email protected]> --- vgasrc/vgaentry.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vgasrc/vgaentry.S b/vgasrc/vgaentry.S index f9624fc..93f28f9 100644 --- a/vgasrc/vgaentry.S +++ b/vgasrc/vgaentry.S @@ -14,7 +14,7 @@ * Rom Header ****************************************************************/ - .section .rom.header + .section .rom.header,"a" .code16 .global _rom_header, _rom_header_size, _rom_header_checksum _rom_header: -- 2.26.2.526.g744177e7f7-goog _______________________________________________ SeaBIOS mailing list -- [email protected] To unsubscribe send an email to [email protected]
