gnu-efi/gnuefi
Sergei Trofimovich 2cc0b085fb gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64)
Gentoo has slightly modified linker defaults: --hash-style=gnu
This means all ELF files in system have '.gnu.hash' section
but no '.hash' section.

gnuefi's ldscript did not account for it and as a result
one symbol 'ImageBase' did not resolve locally for elilo.so
and caused 'elilo' to fail to load by ia64 EFI:
  Loading.: Gentoo (try new elilo)
  ImageAddress: pointer is outside of image
  ImageAddress: pointer is outside of image

Those two relocations come from crt0-efi-ia64.S PE32 entry point
fdescr:

```
    #define IMAGE_REL_BASED_DIR64<->10
    .section .reloc, "a"
    data4   _start_plabel // Page RVA
    data4   12            // Block Size (2*4+2*2)
    data2   (IMAGE_REL_BASED_DIR64<<12) +  0 // reloc for plabel's entry point
    data2   (IMAGE_REL_BASED_DIR64<<12) +  8 // reloc for plabel's global pointer
```

These refer ImageBase.

The change adds '.gnu.hash' collection (follows existing '.hash'
collection).

Tested on IA-64 by successfully booting elilo-3.16.

Bug: https://bugs.gentoo.org/575300
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2018-01-27 20:29:05 +00:00
..
crt0-efi-aarch64.S For compatibility with an upcoming EDK2 feature that maps UEFI apps 2017-02-15 19:54:32 -05:00
crt0-efi-arm.S From: Ard Biesheuvel <ard.biesheuvel@linaro.org> 2015-12-23 08:19:46 -05:00
crt0-efi-ia32.S The gnu-efi-3.0 toplevel subdirectory is really annoying. Kill it. 2014-11-25 10:09:50 -05:00
crt0-efi-ia64.S The gnu-efi-3.0 toplevel subdirectory is really annoying. Kill it. 2014-11-25 10:09:50 -05:00
crt0-efi-mips64el.S Add support for 64 bit MIPS 2017-01-08 07:04:52 -05:00
crt0-efi-x86_64.S The gnu-efi-3.0 toplevel subdirectory is really annoying. Kill it. 2014-11-25 10:09:50 -05:00
elf_aarch64_efi.lds For compatibility with an upcoming EDK2 feature that maps UEFI apps 2017-02-15 19:54:32 -05:00
elf_arm_efi.lds Apparently some linkers will just throw caution to the wind and 2016-02-25 09:36:53 -05:00
elf_ia32_efi.lds gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64) 2018-01-27 20:29:05 +00:00
elf_ia32_fbsd_efi.lds gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64) 2018-01-27 20:29:05 +00:00
elf_ia64_efi.lds gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64) 2018-01-27 20:29:05 +00:00
elf_mips64el_efi.lds Add support for 64 bit MIPS 2017-01-08 07:04:52 -05:00
elf_x86_64_efi.lds gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64) 2018-01-27 20:29:05 +00:00
elf_x86_64_fbsd_efi.lds gnuefi: preserve .gnu.hash sections (unbreaks elilo on IA-64) 2018-01-27 20:29:05 +00:00
Makefile Enable out-of-tree building 2015-02-19 11:22:45 -05:00
reloc_aarch64.c Commit 3dd05c and subsequent ones introduced the use of the GNU 2016-03-25 13:32:54 -04:00
reloc_arm.c Commit 3dd05c and subsequent ones introduced the use of the GNU 2016-03-25 13:32:54 -04:00
reloc_ia32.c Commit 3dd05c and subsequent ones introduced the use of the GNU 2016-03-25 13:32:54 -04:00
reloc_ia64.S The gnu-efi-3.0 toplevel subdirectory is really annoying. Kill it. 2014-11-25 10:09:50 -05:00
reloc_mips64el.c Add support for 64 bit MIPS 2017-01-08 07:04:52 -05:00
reloc_x86_64.c Commit 3dd05c and subsequent ones introduced the use of the GNU 2016-03-25 13:32:54 -04:00