Ubuntu Pastebin

Paste from sforshee at Wed, 19 Jul 2017 19:12:43 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
commit 1c17b3be45cab693ed3c979dd29e883308f4a968
Author: Tim Gardner <tim.gardner@canonical.com>
Date:   Mon Feb 6 13:07:07 2017 -0700

    UBUNTU: SAUCE: Partial revert of 'powerpc: Simplify module TOC handling'
    
    Partially revert 'powerpc: Simplify module TOC handling' in order
    to accomodate older toolchains.
    
    Signed-off-by: Tim Gardner <tim.gardner@canonical.com>

diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index d5f2431daa5e..fc061cce293f 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -717,3 +717,31 @@ _GLOBAL(kexec_sequence)
 	li	r5,0
 	blr	/* image->start(physid, image->start, 0); */
 #endif /* CONFIG_KEXEC_CORE */
+
+#ifdef CONFIG_MODULES
+#if defined(_CALL_ELF) && _CALL_ELF == 2
+
+#ifdef CONFIG_MODVERSIONS
+.weak __crc_TOC.
+.section "___kcrctab+TOC.","a"
+.globl __kcrctab_TOC.
+__kcrctab_TOC.:
+        .llong  __crc_TOC.
+#endif
+
+/*
+ * Export a fake .TOC. since both modpost and depmod will complain otherwise.
+ * Both modpost and depmod strip the leading . so we do the same here.
+ */
+.section "__ksymtab_strings","a"
+__kstrtab_TOC.:
+        .asciz "TOC."
+
+.section "___ksymtab+TOC.","a"
+/* This symbol name is important: it's used by modpost to find exported syms */
+.globl __ksymtab_TOC.
+__ksymtab_TOC.:
+        .llong 0 /* .value */
+        .llong __kstrtab_TOC.
+#endif /* ELFv2 */
+#endif /* MODULES */
Download as text