git: e2295b911723 - main - stand: i386/amd64: Always use elf format for /boot/loader and pxeldr

From: Warner Losh <imp_at_FreeBSD.org>
Date: Thu, 11 Aug 2022 03:31:35 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=e2295b9117233d8248fe919c6b28ef1d44a8950d

commit e2295b9117233d8248fe919c6b28ef1d44a8950d
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-08-11 03:18:32 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-08-11 03:28:22 +0000

    stand: i386/amd64: Always use elf format for /boot/loader and pxeldr
    
    The first level boot blocks have understood how to load ELF code since
    1999. Switch /boot/loader and /boot/pxeldr over to being ELF format so
    that in-tree tools can examine them more closely. In addition, one
    could, in theory, now have a 'lo-mem' and a 'hi-mem' segment (though a
    lot of work would need to be done with bounce buffers, btx, code segment
    marking, etc for an arrangement like that to work).
    
    As far as I can tell, this is the last a.out binary in the tree. There
    are several raw binaries left, but everything else is ELF.
    
    Reviewed by:            emaste, kevans
    Sponsored by:           Netflix
    Differential Revision:  https://reviews.freebsd.org/D36130
---
 stand/i386/loader/Makefile | 2 +-
 stand/i386/pxeldr/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/stand/i386/loader/Makefile b/stand/i386/loader/Makefile
index 571e3b2cb653..3685281ffd2c 100644
--- a/stand/i386/loader/Makefile
+++ b/stand/i386/loader/Makefile
@@ -80,7 +80,7 @@ CFLAGS+=	-I${BOOTSRC}/i386
 	vtfontcvt -f compressed-source -o ${.TARGET} ${.ALLSRC}
 
 ${LOADER}: ${LOADER}.bin ${BTXLDR} ${BTXKERN}
-	btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
+	btxld -v -f elf -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
 		-b ${BTXKERN} ${LOADER}.bin
 
 ${LOADER}.bin: ${LOADER}.sym
diff --git a/stand/i386/pxeldr/Makefile b/stand/i386/pxeldr/Makefile
index 2184d391937f..a44dc0de2885 100644
--- a/stand/i386/pxeldr/Makefile
+++ b/stand/i386/pxeldr/Makefile
@@ -39,7 +39,7 @@ LDFLAGS+=${LDFLAGS_BIN}
 CLEANFILES+= ${LOADER}
 
 ${LOADER}: ${LOADERBIN} ${BTXLDR} ${BTXKERN}
-	btxld -v -f aout -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
+	btxld -v -f elf -e ${LOADER_ADDRESS} -o ${.TARGET} -l ${BTXLDR} \
 	    -b ${BTXKERN} ${LOADERBIN}
 
 .include <bsd.prog.mk>