aboutsummaryrefslogtreecommitdiffstats
path: root/diag
diff options
context:
space:
mode:
authorGene Cumm <gene.cumm@gmail.com>2011-03-16 17:16:54 -0400
committerGene Cumm <gene.cumm@gmail.com>2011-03-16 17:16:54 -0400
commit9f8b76d41f7cf2d87faae49fd000d23276f36be8 (patch)
treeabb705cea23df3acdc61127b9e912c0dc9c1dc18 /diag
parentdf4b01cb1e7e4009b25f874772f8b5ea9bebb268 (diff)
downloadsyslinux-9f8b76d41f7cf2d87faae49fd000d23276f36be8.tar.gz
syslinux-9f8b76d41f7cf2d87faae49fd000d23276f36be8.tar.xz
syslinux-9f8b76d41f7cf2d87faae49fd000d23276f36be8.zip
diag/mbr/: use checksize.pl to pad/prevent overflow
HPA noticed that using Fedora 15 Alpha and gcc-4.6 broke on this code
Diffstat (limited to 'diag')
-rw-r--r--diag/mbr/Makefile8
-rw-r--r--diag/mbr/handoff.S6
2 files changed, 7 insertions, 7 deletions
diff --git a/diag/mbr/Makefile b/diag/mbr/Makefile
index af4cd258..a94253af 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 74534322..b3fe5139 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: