From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Fedora Ninjas Date: Fri, 28 Nov 2025 11:25:19 +0100 Subject: [PATCH] mkimage: Remove duplicates Signed-off-by: Nicolas Frayer --- util/grub-mkimagexx.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c index 7da40d5eb98c..d12b1ba2bae3 100644 --- a/util/grub-mkimagexx.c +++ b/util/grub-mkimagexx.c @@ -566,28 +566,6 @@ SUFFIX (grub_mkimage_generate_elf) (const struct grub_install_image_target_desc phdr->p_offset = grub_host_to_target32 (header_size + program_size + footer_offset); } - if (appsig_size) { - int note_size = ALIGN_UP(sizeof (struct grub_appended_signature_note) + appsig_size, 4); - struct grub_appended_signature_note *note_ptr = (struct grub_appended_signature_note *) - (elf_img + program_size + header_size + (note ? sizeof (struct grub_ieee1275_note) : 0)); - - note_ptr->header.n_namesz = grub_host_to_target32 (sizeof (GRUB_APPENDED_SIGNATURE_NOTE_NAME)); - /* needs to sit at the end, so we round this up and sign some zero padding */ - note_ptr->header.n_descsz = grub_host_to_target32 (ALIGN_UP(appsig_size, 4)); - note_ptr->header.n_type = grub_host_to_target32 (GRUB_APPENDED_SIGNATURE_NOTE_TYPE); - strcpy (note_ptr->name, GRUB_APPENDED_SIGNATURE_NOTE_NAME); - - phdr++; - phdr->p_type = grub_host_to_target32 (PT_NOTE); - phdr->p_flags = grub_host_to_target32 (PF_R); - phdr->p_align = grub_host_to_target32 (image_target->voidp_sizeof); - phdr->p_vaddr = 0; - phdr->p_paddr = 0; - phdr->p_filesz = grub_host_to_target32 (note_size); - phdr->p_memsz = 0; - phdr->p_offset = grub_host_to_target32 (header_size + program_size + (note ? sizeof (struct grub_ieee1275_note) : 0)); - } - { char *str_start = (elf_img + sizeof (*ehdr) + phnum * sizeof (*phdr) + shnum * sizeof (*shdr));