diff -rup memtest86-4.0a.orig/Makefile memtest86-4.0a.good+new_ld/Makefile --- memtest86-4.0a.orig/Makefile 2011-08-17 16:47:09.000000000 +0300 +++ memtest86-4.0a.good+new_ld/Makefile 2011-11-17 00:41:51.198479898 +0200 @@ -8,9 +8,7 @@ # FDISK=/dev/fd0 -AS=as -32 -CC=gcc - +ASFLAGS= -32 CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \ -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector @@ -25,13 +23,13 @@ all: clean memtest.bin memtest memtest_shared: $(OBJS) memtest_shared.lds Makefile $(LD) --warn-constructors --warn-common -static -T memtest_shared.lds \ -o $@ $(OBJS) && \ - $(LD) -shared -Bsymbolic -T memtest_shared.lds -o $@ $(OBJS) + $(LD) -shared -Bsymbolic -N --oformat elf32-i386-freebsd -T memtest_shared.lds -o $@ $(OBJS) memtest_shared.bin: memtest_shared objcopy -O binary $< memtest_shared.bin memtest: memtest_shared.bin memtest.lds - $(LD) -s -T memtest.lds -b binary memtest_shared.bin -o $@ + $(LD) -s -N --oformat elf32-i386-freebsd -T memtest.lds -b binary memtest_shared.bin -o $@ head.s: head.S config.h defs.h test.h $(CC) -E -traditional $< -o $@ @@ -60,7 +58,7 @@ clean: memtest_shared.bin memtest.iso iso: - make all + ${MAKE} all ./makeiso.sh install: all Only in memtest86-4.0a.good+new_ld: bootsect.o Only in memtest86-4.0a.good+new_ld: bootsect.s Only in memtest86-4.0a.good+new_ld: config.o Only in memtest86-4.0a.good+new_ld: cpuid.o Only in memtest86-4.0a.good+new_ld: error.o Only in memtest86-4.0a.good+new_ld: head.o Only in memtest86-4.0a.good+new_ld: head.s Only in memtest86-4.0a.good+new_ld: init.o Only in memtest86-4.0a.good+new_ld: lib.o Only in memtest86-4.0a.good+new_ld: linuxbios.o diff -rup memtest86-4.0a.orig/main.c memtest86-4.0a.good+new_ld/main.c --- memtest86-4.0a.orig/main.c 2011-08-17 16:48:01.000000000 +0300 +++ memtest86-4.0a.good+new_ld/main.c 2011-11-13 23:27:11.691326000 +0200 @@ -218,6 +218,12 @@ void test_start(void) /* These steps are only done by the boot cpu */ if (my_cpu_num == 0) { + + /* Ensure that we always start at LOW_TEST_ADR */ + if ((ulong)&_start != LOW_TEST_ADR) { + restart_internal(0); + } + parse_command_line(); mem_size(); /* must be called before initialise_cpus(); */ initialise_cpus(); Only in memtest86-4.0a.good+new_ld: main.o Only in memtest86-4.0a.good+new_ld: memsize.o Only in memtest86-4.0a.good+new_ld: memtest Only in memtest86-4.0a.good+new_ld: memtest.bin Only in memtest86-4.0a.good+new_ld: memtest.iso diff -rup memtest86-4.0a.orig/memtest.lds memtest86-4.0a.good+new_ld/memtest.lds --- memtest86-4.0a.orig/memtest.lds 2011-08-17 16:47:09.000000000 +0300 +++ memtest86-4.0a.good+new_ld/memtest.lds 2011-11-13 23:28:27.871323000 +0200 @@ -3,7 +3,7 @@ OUTPUT_ARCH(i386); ENTRY(_start); SECTIONS { - . = 0x10000; + . = 0xc0120000; _start = . ; .data : { *(.data) Only in memtest86-4.0a.good+new_ld: memtest_shared Only in memtest86-4.0a.good+new_ld: memtest_shared.bin Only in memtest86-4.0a.good+new_ld: patn.o Only in memtest86-4.0a.good+new_ld: random.o Only in memtest86-4.0a.good+new_ld: reloc.o Only in memtest86-4.0a.good+new_ld: screen_buffer.o Only in memtest86-4.0a.good+new_ld: setup.o Only in memtest86-4.0a.good+new_ld: setup.s Only in memtest86-4.0a.good+new_ld: smp.o Only in memtest86-4.0a.good+new_ld: test.o Only in memtest86-4.0a.good+new_ld: vmem.o