Thread (6 messages) flat view 6 messages, 4 authors, 2021-05-14

Re: [PATCH v3] powerpc/64: Option to use ELFv2 ABI for big-endian kernels

From: Nicholas Piggin <npiggin@gmail.com>
Date: 2021-05-04 10:27:41

Possibly related (same subject, not in this thread)

Excerpts from Michal Suchánek's message of May 4, 2021 12:38 am:
On Mon, May 03, 2021 at 01:37:57PM +0200, Andreas Schwab wrote:
quoted
Should this add a tag to the module vermagic?
Good question.
Would the modues link even if the vermagic was not changed?

I suppose something like this might do it.
Yeah I don't know how robust the loader would be to a mismatch. We could 
add this patch.

Thanks,
Nick
quoted hunk ↗ jump to hunk
Thanks

Michal
diff --git a/arch/powerpc/include/asm/vermagic.h b/arch/powerpc/include/asm/vermagic.h
index b054a8576e5d..3fdaacd7a743 100644
--- a/arch/powerpc/include/asm/vermagic.h
+++ b/arch/powerpc/include/asm/vermagic.h
@@ -14,7 +14,14 @@
 #define MODULE_ARCH_VERMAGIC_RELOCATABLE	""
 #endif
 
+
+#ifdef CONFIG_PPC64_BUILD_BIG_ENDIAN_ELF_V2_ABI
+#define MODULE_ARCH_VERMAGIC_ELF_V2_ABI	"abi-elfv2 "
+#else
+#define MODULE_ARCH_VERMAGIC_ELF_V2_ABI	""
+#endif
+
 #define MODULE_ARCH_VERMAGIC \
-		MODULE_ARCH_VERMAGIC_FTRACE MODULE_ARCH_VERMAGIC_RELOCATABLE
+		MODULE_ARCH_VERMAGIC_FTRACE MODULE_ARCH_VERMAGIC_RELOCATABLE MODULE_ARCH_VERMAGIC_ELF_V2_ABI
 
 #endif /* _ASM_VERMAGIC_H */
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help