path: root/arch/s390/include/asm/purgatory.h
diff options
authorPhilipp Rudo <prudo@linux.ibm.com>2018-06-27 12:03:43 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-07-06 08:47:51 +0200
commit287d6070acbb2529e24462faffca46663885dddc (patch)
tree25a34c095e4d1983926043f92bf4ca5fb86e3141 /arch/s390/include/asm/purgatory.h
parentc315e69308c739a43c4ebc539bedbc1ac8d79854 (diff)
s390/purgatory: Remove duplicate variable definitions
Currently there are some variables in the purgatory (e.g. kernel_entry) which are defined twice, once in assembler- and once in c-code. The reason for this is that these variables are set during purgatory load, where sanity checks on the corresponding Elf_Sym's are made, while they are used in assembler-code. Thus adding a second definition in c-code is a handy workaround to guarantee correct Elf_Sym's are created. When the purgatory is compiled with -fcommon (default for gcc on s390) this is no problem because both symbols are merged by the linker. However this is not required by ISO C and when the purgatory is built with -fno-common the linker fails with errors like arch/s390/purgatory/purgatory.o:(.bss+0x18): multiple definition of `kernel_entry' arch/s390/purgatory/head.o:/.../arch/s390/purgatory/head.S:230: first defined here Thus remove the duplicate definitions and add the required size and type information to the assembler definition. Also add -fno-common to the command line options to prevent similar hacks in the future. Signed-off-by: Philipp Rudo <prudo@linux.ibm.com> Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/purgatory.h')
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/s390/include/asm/purgatory.h b/arch/s390/include/asm/purgatory.h
index 6090670df51f..e297bcfc476f 100644
--- a/arch/s390/include/asm/purgatory.h
+++ b/arch/s390/include/asm/purgatory.h
@@ -13,11 +13,5 @@
int verify_sha256_digest(void);
-extern u64 kernel_entry;
-extern u64 kernel_type;
-extern u64 crash_start;
-extern u64 crash_size;
#endif /* __ASSEMBLY__ */
#endif /* _S390_PURGATORY_H_ */

Privacy Policy