summaryrefslogtreecommitdiff
path: root/drivers/firmware/efi/libstub/efistub.h
diff options
context:
space:
mode:
authorArvind Sankar <nivedita@alum.mit.edu>2020-04-16 11:12:26 -0400
committerArd Biesheuvel <ardb@kernel.org>2020-04-24 14:52:16 +0200
commit26a92425f9a301fdeb5482e7891915ce43cc0556 (patch)
treec529548c0533b2f748a3f3fd72154f939be79df8 /drivers/firmware/efi/libstub/efistub.h
parent420b6d00ca94ce5b6578b1bc12e767ac7a0251ac (diff)
efi/x86: Remove __efistub_global and add relocation check
Instead of using __efistub_global to force variables into the .data section, leave them in the .bss but pull the EFI stub's .bss section into .data in the linker script for the compressed kernel. Add relocation checking for x86 as well to catch non-PC-relative relocations that require runtime processing, since the EFI stub does not do any runtime relocation processing. This will catch, for example, data relocations created by static initializers of pointers. Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu> Link: https://lore.kernel.org/r/20200416151227.3360778-3-nivedita@alum.mit.edu Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/efistub.h')
-rw-r--r--drivers/firmware/efi/libstub/efistub.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h
index 96e25b17c88e..5244eacc5d4b 100644
--- a/drivers/firmware/efi/libstub/efistub.h
+++ b/drivers/firmware/efi/libstub/efistub.h
@@ -25,11 +25,7 @@
#define EFI_ALLOC_ALIGN EFI_PAGE_SIZE
#endif
-#if defined(CONFIG_X86)
-#define __efistub_global __section(.data)
-#else
#define __efistub_global
-#endif
extern bool __pure nochunk(void);
extern bool __pure nokaslr(void);