gnu-efi/gnu-efi-3.0e-no-relocations.patch
2010-07-23 20:56:14 +00:00

34 lines
946 B
Diff

From 364351b4448ff20730250e89ad09088d6aeafc72 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@cutlet.install.bos.redhat.com>
Date: Fri, 3 Oct 2008 14:40:56 -0400
Subject: [PATCH] Fix the case where there are no relocations.
diff --git a/gnuefi/reloc_ia32.c b/gnuefi/reloc_ia32.c
index 9bf4a8d..0b461cf 100644
--- a/gnuefi/reloc_ia32.c
+++ b/gnuefi/reloc_ia32.c
@@ -76,6 +76,9 @@ EFI_STATUS _relocate (long ldbase, ElfW(Dyn) *dyn, EFI_HANDLE image, EFI_SYSTEM_
}
}
+ if (!rel && relent == 0)
+ return EFI_SUCCESS;
+
if (!rel || relent == 0)
return EFI_LOAD_ERROR;
diff --git a/gnuefi/reloc_x86_64.c b/gnuefi/reloc_x86_64.c
index 9906084..3f94f47 100644
--- a/gnuefi/reloc_x86_64.c
+++ b/gnuefi/reloc_x86_64.c
@@ -76,6 +76,9 @@ EFI_STATUS _relocate (long ldbase, ElfW(Dyn) *dyn, EFI_HANDLE image, EFI_SYSTEM_
}
}
+ if (!rel && relent == 0)
+ return EFI_SUCCESS;
+
if (!rel || relent == 0)
return EFI_LOAD_ERROR;