This patch adds "__tgt_image_info" field for each of the images
embedded in a multi-arch image. Required changes in libomptarget
are also shown.
The information in "tgt_image_info" struct is provided in the clang-linker-wrapper
as a call to tgt_register_image_info for each image in the library
of images also created by the clang-linker-wrapper.
tgt_register_image_info is called for each image BEFORE the single
call to tgt_register_lib so that image information is available
before they are loaded. clang-linker-wrapper gets this image information
from command line arguments provided by the clang driver when it creates
the call to the clang-linker-wrapper command.
This architecture allows the binary image (pointed to by ImageStart and
ImageEnd in tgt_device_image) to remain architecture indenendent.
That is, the architecture independent part of the libomptarget runtime
does not need to peer inside the image to determine if it is loadable
even though in most cases the image is an elf object.
There is one tgt_image_info for each tgt_device_image. For backward
compabibility, no changes are allowed to either tgt_device_image or
tgt_bin_desc. The absense of __tgt_image_info is the indication that
the runtime is being used on a binary created by an old version of