Re: [RFC PATCH 07/10] arm: efi_loader: discard hash, unwind information

Ilias Apalodimas
2023-05-22T07:00:42Z

Hi Sam

On Sat, 20 May 2023 at 23:56, Sam Edwards <cfsworks@gmail.com> wrote:
>
> LLD tends to put these at the very beginning of the file, only
> for the .text 0x0 directive to end up going backward and
> overlapping them, creating an error.
>
> Since they don't appear to be used at runtime, just discard them.
>
> Signed-off-by: Sam Edwards <CFSworks@gmail.com>
> ---
>
> arch/arm/lib/elf_arm_efi.lds | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/lib/elf_arm_efi.lds b/arch/arm/lib/elf_arm_efi.lds
> index 767ebda635..0b6cc5bcb6 100644
> --- a/arch/arm/lib/elf_arm_efi.lds
> +++ b/arch/arm/lib/elf_arm_efi.lds
> @@ -62,5 +62,8 @@ SECTIONS
> *(.dynstr)
> *(.note.gnu.build-id)
> *(.comment)
> + *(.hash)
> + *(.gnu.hash)

The reason we end up with both hash and gnu.hash is because the hash
style is set to 'both'. Should we perhaps use (and strip) only one of
them?

Thanks
/Ilias

> + *(.ARM.exidx)
> }
> }
> --
> 2.39.2
>