summaryrefslogtreecommitdiff
path: root/diag/mbr/Makefile
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/mbr/Makefile
parentdf4b01cb1e7e4009b25f874772f8b5ea9bebb268 (diff)
downloadsyslinux-9f8b76d41f7cf2d87faae49fd000d23276f36be8.tar.gz
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/mbr/Makefile')
-rw-r--r--diag/mbr/Makefile8
1 files changed, 7 insertions, 1 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