All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] efi: arm64: use -fpie for building the stub
@ 2017-05-18  9:09 ` Ard Biesheuvel
  0 siblings, 0 replies; 20+ messages in thread
From: Ard Biesheuvel @ 2017-05-18  9:09 UTC (permalink / raw)
  To: linux-efi-u79uwXL29TY76Z2rM5mHXA
  Cc: mark.rutland-5wv7dgnIgG8, ghackmann-hpIqsD4AKlfQT0dZR+AlfA,
	matt-mF/unelCI9GS6iBeEJttW/XRex20P6io, mka-F7+t8E8rja9g9hUCZPvPmw,
	Bernhard.Rosenkranzer-QSEj5FYQhm4dnm+yROfE0A,
	grundler-F7+t8E8rja9g9hUCZPvPmw, md-hpIqsD4AKlfQT0dZR+AlfA,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Ard Biesheuvel

Clang requires the stub to be built with -fpie, or it may emit absolute
symbol references that trigger the absolute relocation detection code and
cause the build to fail.

The remedy is to set -fpie (#3), but due to stupid ELF symbol preemption
rules that only apply to shared libraries, this will result in more rather
than fewer absolute references (i.e., GOT entries), which we have to massage
away using visibility overrides first. (#1, #2)

Ard Biesheuvel (3):
  efi/libstub: arm64: use hidden attribute for struct screen_info
    reference
  efi/libstub: arm64: force 'hidden' visibility for section markers
  efi/libstub: arm64: set -fpie when building the EFI stub

 arch/arm64/include/asm/efi.h              |  3 +++
 drivers/firmware/efi/libstub/Makefile     |  2 +-
 drivers/firmware/efi/libstub/arm64-stub.c | 10 +++++++++-
 3 files changed, 13 insertions(+), 2 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2017-06-09  9:02 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-18  9:09 [PATCH 0/3] efi: arm64: use -fpie for building the stub Ard Biesheuvel
2017-05-18  9:09 ` Ard Biesheuvel
     [not found] ` <20170518090953.32628-1-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-05-18  9:09   ` [PATCH 1/3] efi/libstub: arm64: use hidden attribute for struct screen_info reference Ard Biesheuvel
2017-05-18  9:09     ` Ard Biesheuvel
     [not found]     ` <20170518090953.32628-2-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-06-08 19:06       ` Matthias Kaehlcke
2017-06-08 19:06         ` Matthias Kaehlcke
2017-05-18  9:09   ` [PATCH 2/3] efi/libstub: arm64: force 'hidden' visibility for section markers Ard Biesheuvel
2017-05-18  9:09     ` Ard Biesheuvel
     [not found]     ` <20170518090953.32628-3-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-06-08 19:07       ` Matthias Kaehlcke
2017-06-08 19:07         ` Matthias Kaehlcke
2017-05-18  9:09   ` [PATCH 3/3] efi/libstub: arm64: set -fpie when building the EFI stub Ard Biesheuvel
2017-05-18  9:09     ` Ard Biesheuvel
     [not found]     ` <20170518090953.32628-4-ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2017-06-08 19:08       ` Matthias Kaehlcke
2017-06-08 19:08         ` Matthias Kaehlcke
     [not found]         ` <20170608190804.GG141096-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2017-06-08 19:18           ` Ard Biesheuvel
2017-06-08 19:18             ` Ard Biesheuvel
     [not found]             ` <CAKv+Gu--WbvmS3EMPSD8sx6yVqgHQJO1r70+SYBRo_WZjUxioQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-06-08 19:44               ` Matthias Kaehlcke
2017-06-08 19:44                 ` Matthias Kaehlcke
2017-06-09  9:02   ` [PATCH 0/3] efi: arm64: use -fpie for building the stub Ard Biesheuvel
2017-06-09  9:02     ` Ard Biesheuvel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.