  #include <limits.h>
  #include <stdint.h>
  #include <purgatory.h>
-@@ -18,8 +18,10 @@
-	sha256_starts(&ctx);
-	end = &sha256_regions[sizeof(sha256_regions)/sizeof(sha256_regions[0])];
-	for(ptr = sha256_regions; ptr < end; ptr++) {
--		sha256_update(&ctx, (uint8_t *)((uintptr_t)ptr->start),
-+/*		sha256_update(&ctx, (uint8_t *)((uintptr_t)ptr->start),
-			      ptr->len);
-+*/
-+		sha256_update(&ctx, ptr->start, ptr->len);
+@@ -3,7 +3,7 @@
+ #include <stdint.h>
+ #include <purgatory.h>
+ #include <sha256.h>
+-#include <string.h>
++/* #include <string.h> */
+ #include "../kexec/kexec-sha256.h"
+
+ struct sha256_region sha256_regions[SHA256_REGIONS] = {};
 	}
 	sha256_finish(&ctx, digest);
 	if (memcmp(digest, sha256_digest, sizeof(digest)) != 0) {


 #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) || !defined(__BIG_ENDIAN)
 #error Endian defines missing

===================================================================
--- kexec-tools-2.0.0.orig/purgatory/Makefile	2009-04-24 14:15:34.037827479 +0100
+++ kexec-tools-2.0.0/purgatory/Makefile	2009-04-24 14:15:47.022825503 +0100
@@ -55,9 +54,7 @@
			-I$(srcdir)/purgatory/arch/$(ARCH)/include \
			-I$(srcdir)/util_lib/include \
			-I$(shell $(CC) -print-file-name=include)
-$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
-			--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
-			-e purgatory_start -r
+$(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)

 $(PURGATORY): $(PURGATORY_OBJS)
	$(MKDIR) -p $(@D)
Index: kexec-tools-2.0.0/purgatory/purgatory.c
===================================================================
--- kexec-tools-2.0.0.orig/purgatory/purgatory.old	2009-05-16 13:28:19.000000000 +0200
