AKASHI Takahiro 8458bf648f efi_loader: set image_base and image_size to correct values
Currently, image's image_base points to an address where the image was
temporarily uploaded for further loading. Since efi_loader relocates
the image to final destination, image_base and image_size should reflect
that.

This bug was detected in UEFI SCT, "Loaded Image Protocol Test - test 2,"
which shows that 'Unload' function doesn't fit into a range suggested by
image_base and image_size.

	TestCase/UEFI/EFI/Protocol/LoadedImage/BlackBoxTest/
	LoadedImageBBTestMain.c:1002

Changes in this patch also includes:
* reverts a patch, "efi_loader: save image relocation address
  and size" since newly added fields are no longer needed.
* copy PE headers as well since those information will be needed
  for module loading, in particular, at gurb.
  (This bug was reported by Heinrich.)

Reported-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>

Rebase patch.
Remove unused fields from struct efi_loaded_image_obj.

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2019-04-07 14:17:06 +02:00
..
2019-04-05 09:09:56 -04:00
2019-02-19 16:58:24 -05:00
2018-11-27 21:06:53 +05:30
2018-11-14 09:16:27 -08:00
2018-09-29 11:49:35 -06:00
2019-02-13 09:40:05 +01:00
2018-09-10 20:48:16 -04:00
2018-12-07 08:13:45 -05:00
2018-12-07 08:13:45 -05:00
2018-07-26 14:08:22 -05:00
2018-09-23 21:55:30 +02:00
2018-09-23 21:55:30 +02:00
2019-02-20 15:27:09 +08:00
2018-06-13 07:49:12 -04:00
2018-12-06 23:26:32 -05:00
2019-02-09 12:50:22 -07:00
2019-01-01 14:12:18 +01:00
2018-10-22 13:01:27 +02:00
2019-01-01 14:12:18 +01:00
2019-02-09 07:50:58 -05:00
2018-12-05 06:01:35 -07:00
2019-02-02 08:19:17 -05:00
2018-09-18 00:01:18 -06:00
2018-10-02 22:12:32 +05:30
2019-01-24 11:35:30 -06:00
2018-10-09 04:40:27 -06:00
2019-01-18 22:19:09 +05:30
2018-12-05 06:06:44 -07:00
2018-10-07 11:04:01 -04:00
2018-07-19 16:31:37 -04:00
2018-11-27 21:06:53 +05:30
2019-02-01 16:59:12 +01:00
2018-07-20 15:55:05 -04:00
2018-10-09 04:40:27 -06:00
2018-09-28 18:26:32 +02:00