diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2012-10-12 14:58:27 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2012-10-12 14:58:27 +0000 |
commit | 491396b0a3023f0f91541a3d746345186e056b64 (patch) | |
tree | d4ca36eb91b1eb2b7fdbcbc4acb178ce98415555 /sys/arch/amd64/stand/boot/Makefile | |
parent | 55cef35a66141a0725a968d7e7c55d018d656ff6 (diff) |
Add a script that checks the file offsets for boot(8)'s .text and .data
sections match up with their LMAs. This is necessary since biosboot does
not perform relocation.
Discussed with deraadt@
Diffstat (limited to 'sys/arch/amd64/stand/boot/Makefile')
-rw-r--r-- | sys/arch/amd64/stand/boot/Makefile | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/arch/amd64/stand/boot/Makefile b/sys/arch/amd64/stand/boot/Makefile index 2646353ac5c..cf61212da36 100644 --- a/sys/arch/amd64/stand/boot/Makefile +++ b/sys/arch/amd64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.14 2012/10/12 14:00:02 jsing Exp $ +# $OpenBSD: Makefile,v 1.15 2012/10/12 14:58:26 jsing Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -46,8 +46,12 @@ SRCS+= adler32.c crc32.c inflate.c inftrees.c boot.bin: boot objcopy -v -O binary ${PROG} boot.bin +CLEANFILES+= ${PROG}.new + ${PROG}: $(OBJS) - $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) + $(LD) $(LDFLAGS) -o ${PROG}.new $(OBJS) + @perl ${.CURDIR}/check-boot.pl ${PROG}.new + @mv ${PROG}.new ${PROG} @$(SIZE) ${PROG} .else |