]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
grub-mkimage: Creating aarch64 images from x86 host is broken
authorDarren Kenny <darren.kenny@oracle.com>
Wed, 27 Apr 2022 10:46:48 +0000 (10:46 +0000)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 24 May 2022 12:07:23 +0000 (14:07 +0200)
A recent fix that made appears to have broken the ability to create an
aarch64 boot image on a x86-based host.

This was due to an overzealous testing of the architecture when building
grub-mkimage and removing the code that build an ARM image when not built
on ARM.

On the occasion remove redundant break.

Fixes: 8541f319 (grub-mkimage: Only check aarch64 relocations when built for aarch64)
Signed-off-by: Darren Kenny <darren.kenny@oracle.com>
Tested-by: Selva Ganesan <selvaganesan89@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
util/grub-mkimagexx.c

index 1e29e255e8d21554c621916ad3ac63b85aedd4a1..a1927e786928fad775dd106675693e8264434b1d 100644 (file)
@@ -1631,7 +1631,7 @@ translate_relocation_pe (struct translate_context *ctx,
        }
       break;
     case EM_AARCH64:
-#if defined(MKIMAGE_ELF64) && defined(__arm__)
+#if defined(MKIMAGE_ELF64)
       switch (ELF_R_TYPE (info))
        {
        case R_AARCH64_ABS64:
@@ -1667,8 +1667,7 @@ translate_relocation_pe (struct translate_context *ctx,
                           (unsigned int) ELF_R_TYPE (info));
          break;
        }
-#endif /* defined(MKIMAGE_ELF64) && define(__arm__) */
-      break;
+#endif /* defined(MKIMAGE_ELF64) */
       break;
 #if defined(MKIMAGE_ELF32)
     case EM_ARM: