kernel-ark/drivers/firmware/efi/libstub
Ard Biesheuvel 696204faa6 efi/libstub: Preserve .debug sections after absolute relocation check
The build commands for the ARM and arm64 EFI stubs strip the .debug
sections and other sections that may legally contain absolute relocations,
in order to inspect the remaining sections for the presence of such
relocations.

This leaves us without debugging symbols in the stub for no good reason,
considering that these sections are omitted from the kernel binary anyway,
and that these relocations are thus only consumed by users of the ELF
binary, such as debuggers.

So move to 'strip' for performing the relocation check, and if it succeeds,
invoke objcopy as before, but leaving the .debug sections in place. Note
that these sections may refer to ksymtab/kcrctab contents, so leave those
in place as well.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1485868902-20401-11-git-send-email-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-02-01 08:45:47 +01:00
..
arm32-stub.c efi/arm/libstub: Make screen_info accessible to the UEFI stub 2016-04-28 11:33:59 +02:00
arm64-stub.c arm64: kaslr: increase randomization granularity 2016-04-28 19:44:15 +01:00
arm-stub.c efi: Deduplicate efi_file_size() / _read() / _close() 2017-02-01 08:45:42 +01:00
efi-stub-helper.c efi: Deduplicate efi_file_size() / _read() / _close() 2017-02-01 08:45:42 +01:00
efistub.h efi: Deduplicate efi_file_size() / _read() / _close() 2017-02-01 08:45:42 +01:00
fdt.c efi/libstub/arm*: Pass latest memory map to the kernel 2016-12-28 09:23:32 +01:00
gop.c efi/libstub: Move Graphics Output Protocol handling to generic code 2016-04-28 11:33:57 +02:00
Makefile efi/libstub: Preserve .debug sections after absolute relocation check 2017-02-01 08:45:47 +01:00
random.c efi/libstub: Make efi_random_alloc() allocate below 4 GB on 32-bit 2016-11-25 07:15:23 +01:00
string.c arm64/efi: isolate EFI stub from the kernel proper 2015-10-12 16:20:12 +01:00