make sure all the flags in question force i386 and disable SSP --- a/Makefile +++ b/Makefile @@ -8,10 +8,9 @@ # FDISK=/dev/fd0 -AS=as -32 -CC=gcc +ASFLAGS=-32 -CFLAGS= -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC $(SMP_FL) +CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin -ffreestanding -fPIC -fno-stack-protector $(SMP_FL) OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \ config.o linuxbios.o memsize.o pci.o controller.o random.o extra.o \ @@ -26,7 +25,7 @@ # symbols and then link it dynamically so I have full # relocation information memtest_shared: $(OBJS) memtest_shared.lds Makefile - $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \ + $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds -m elf_i386 \ -o $@ $(OBJS) && \ $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS) @@ -53,7 +52,7 @@ $(CC) -c $(CFLAGS) -fno-strict-aliasing reloc.c test.o: test.c - $(CC) -c -Wall -march=i486 -m32 -Os -fomit-frame-pointer -fno-builtin -ffreestanding test.c + $(CC) -c $(CFLAGS:-fPIC=) -o $@ $< clean: rm -f *.o *.s *.iso memtest.bin memtest memtest_shared memtest_shared.bin @@ -72,3 +71,6 @@ dos: all cat mt86+_loader memtest.bin > memtest.exe +head.o: head.s +bootsect.o: bootsect.s +setup.o: setup.s