Files
slimbootloader/BootloaderCommonPkg/Library
Bruno Achauer 3f0beb9fa3 Ensure that ELF images are loaded at their preferred address (#1833)
Currently, loading an ELF image will relocate the image (to its
preferred load address) only if there is at least one ELF segment
that is not completely contained in the file loaded (i.e. the memory
segment size is larger than the size inside the file. This behavior
is generally triggered by the segment that contains the .bss section).

Consequently, images that contain initialized data only (e.g. QNX IFS
files) don't get relocated, and will usually crash when jumping to the
image entry point.

This change checks whether the ELF image is already loaded at the
preferred address, and forces image relocation if not.

Signed-off-by: Bruno Achauer <bruno.achauer@intel.com>
2023-02-21 08:40:13 -08:00
..
2022-02-08 06:38:59 -08:00
2022-02-08 06:38:59 -08:00
2022-10-17 11:55:10 -07:00