 -#endif
 +#include "zlib.h"
 +
++
  #include <sha256.h>
  #include "kexec.h"
  #include "kexec-syscall.h"
-@@ -554,6 +554,6 @@
+@@ -555,6 +555,6 @@
  }
 
 -#if HAVE_LIBZ

===================================================================
--- kexec-tools-2.0.1.orig/kexec/kexec.c	2008-02-24 14:15:46.950825917 +0100
+++ kexec-tools-2.0.1/kexec/kexec.c	2009-09-26 01:58:53.545624148 +0200
@@ -38,9 +38,8 @@

 #include "config.h"


 extern void add_segment(struct kexec_info *info,
	const void *buf, size_t bufsz, unsigned long base, size_t memsz);
 extern void add_segment_phys_virt(struct kexec_info *info,

Index: kexec-tools-2.0.1/Makefile.in
===================================================================
--- kexec-tools-2.0.1.orig/Makefile.in	2009-09-29 23:49:47.000000000 +0200
+++ kexec-tools-2.0.1/Makefile.in	2009-09-29 23:49:09.000000000 +0200
@@ -46,7 +46,7 @@
 # where necessary.
 CPPFLAGS	= @CPPFLAGS@ -I$(srcdir)/include -I$(srcdir)/util_lib/include \
			-Iinclude/
-CFLAGS		= @CFLAGS@ -fno-strict-aliasing -Wall -Wstrict-prototypes
+CFLAGS		= @CFLAGS@ -static -fno-strict-aliasing -Wall -Wstrict-prototypes
 PURGATORY_EXTRA_CFLAGS = @PURGATORY_EXTRA_CFLAGS@
 ASFLAGS		= @ASFLAGS@
 LDFLAGS		= @LDFLAGS@

Index: kexec-tools-2.0.1/purgatory/Makefile
===================================================================
--- kexec-tools-2.0.1.orig/purgatory/Makefile	2008-10-09 00:32:14.000000000 +0200
+++ kexec-tools-2.0.1/purgatory/Makefile	2009-09-30 00:49:15.000000000 +0200
@@ -47,15 +47,15 @@
 $(PURGATORY): CC=$(TARGET_CC)
 $(PURGATORY): CFLAGS+=$(PURGATORY_EXTRA_CFLAGS) \
		      $($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
-		      -Os -fno-builtin -ffreestanding
+		      -Os -fno-builtin -ffreestanding -nostdinc

 $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
			-I$(srcdir)/purgatory/include \
			-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 \
+			-Wl,--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
			-e purgatory_start -r

 $(PURGATORY): $(PURGATORY_OBJS)
