[syslinux:master] diag/mbr/: use checksize.pl to pad/prevent overflow
syslinux-bot for Gene Cumm
gene.cumm at gmail.com
Wed Mar 16 17:06:31 PDT 2011
Commit-ID: 9f8b76d41f7cf2d87faae49fd000d23276f36be8
Gitweb: http://syslinux.zytor.com/commit/9f8b76d41f7cf2d87faae49fd000d23276f36be8
Author: Gene Cumm <gene.cumm at gmail.com>
AuthorDate: Wed, 16 Mar 2011 17:16:54 -0400
Committer: Gene Cumm <gene.cumm at gmail.com>
CommitDate: Wed, 16 Mar 2011 17:16:54 -0400
diag/mbr/: use checksize.pl to pad/prevent overflow
HPA noticed that using Fedora 15 Alpha and gcc-4.6 broke on this code
---
diag/mbr/Makefile | 8 +++++++-
diag/mbr/handoff.S | 6 ------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/diag/mbr/Makefile b/diag/mbr/Makefile
index af4cd25..a94253a 100644
--- a/diag/mbr/Makefile
+++ b/diag/mbr/Makefile
@@ -28,8 +28,14 @@ all: handoff.bin
%.elf: %.o $(mbrdir)/mbr.ld
$(LD) $(LDFLAGS) -T $(mbrdir)/mbr.ld -e _start -o $@ $<
-%.bin: %.elf
+%.bin: %.elf $(mbrdir)/checksize.pl
$(OBJCOPY) -O binary $< $@
+ $(PERL) checksize.pl $@
+ $(CHMOD) -x $@
+
+handoff.bin: handoff.elf $(mbrdir)/checksize.pl
+ $(OBJCOPY) -O binary $< $@
+ $(PERL) $(mbrdir)/checksize.pl $@ 420
$(CHMOD) -x $@
mbr_bin.c: mbr.bin
diff --git a/diag/mbr/handoff.S b/diag/mbr/handoff.S
index 7453432..b3fe513 100644
--- a/diag/mbr/handoff.S
+++ b/diag/mbr/handoff.S
@@ -337,9 +337,3 @@ bootfail:
die:
hlt
jmp die
-
-zerob: /* Begin zeroing block to fill to desired length */
- /* 420 bytes for FAT32 */
-zeroln = (420 - (zerob - _start))
- .=.+zeroln /* prevents overflow */
-zeroe:
More information about the Syslinux-commits
mailing list