Przeglądaj źródła

efi_loader: save image relocation address and size

For analyzing crash output the relocation address and size are needed.
Save them in the loaded image info.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
Heinrich Schuchardt 6 lat temu
rodzic
commit
84b40b40ad
2 zmienionych plików z 4 dodań i 0 usunięć
  1. 2 0
      include/efi_api.h
  2. 2 0
      lib/efi_loader/efi_image_loader.c

+ 2 - 0
include/efi_api.h

@@ -331,6 +331,8 @@ struct efi_loaded_image {
 
 	/* Below are efi loader private fields */
 #ifdef CONFIG_EFI_LOADER
+	void *reloc_base;
+	aligned_u64 reloc_size;
 	efi_status_t exit_status;
 	struct jmp_buf_data exit_jmp;
 #endif

+ 2 - 0
lib/efi_loader/efi_image_loader.c

@@ -221,6 +221,8 @@ void *efi_load_pe(void *efi, struct efi_loaded_image *loaded_image_info)
 	/* Populate the loaded image interface bits */
 	loaded_image_info->image_base = efi;
 	loaded_image_info->image_size = image_size;
+	loaded_image_info->reloc_base = efi_reloc;
+	loaded_image_info->reloc_size = virt_size;
 
 	return entry;
 }