From ad1503c3c770180c3540e9c82a58f84e21bdb868 Mon Sep 17 00:00:00 2001 From: Ard Biesheuvel Date: Wed, 3 Sep 2014 21:48:41 +0200 Subject: [PATCH] x86: eliminate x86_64 GOT relocations in early boot code Signed-off-by: Ard Biesheuvel --- arch/x86/boot/boot.h | 4 ++++ arch/x86/boot/compressed/misc.h | 5 +++++ arch/x86/include/asm/efi.h | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/arch/x86/boot/boot.h b/arch/x86/boot/boot.h index bd49ec61255c..18a0010efc20 100644 --- a/arch/x86/boot/boot.h +++ b/arch/x86/boot/boot.h @@ -297,10 +297,14 @@ static inline int cmdline_find_option_bool(const char *option) int check_cpu(int *cpu_level_ptr, int *req_level_ptr, u32 **err_flags_ptr); int validate_cpu(void); +#pragma GCC visibility push(hidden) + /* early_serial_console.c */ extern int early_serial_base; void console_init(void); +#pragma GCC visibility pop + /* edd.c */ void query_edd(void); diff --git a/arch/x86/boot/compressed/misc.h b/arch/x86/boot/compressed/misc.h index 24e3e569a13c..a0fd51f90add 100644 --- a/arch/x86/boot/compressed/misc.h +++ b/arch/x86/boot/compressed/misc.h @@ -29,10 +29,15 @@ #define memptr unsigned #endif +#pragma GCC visibility push(hidden) + /* misc.c */ extern memptr free_mem_ptr; extern memptr free_mem_end_ptr; extern struct boot_params *real_mode; /* Pointer to real-mode data */ + +#pragma GCC visibility pop + void __putstr(const char *s); #define error_putstr(__x) __putstr(__x) diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h index 044a2fd3c5fe..8725d85f1903 100644 --- a/arch/x86/include/asm/efi.h +++ b/arch/x86/include/asm/efi.h @@ -178,7 +178,7 @@ struct efi_config { bool is64; } __packed; -extern struct efi_config *efi_early; +extern __attribute__((visibility("hidden"))) struct efi_config *efi_early; #define efi_call_early(f, ...) \ efi_early->call(efi_early->f, __VA_ARGS__); -- 1.8.3.2