ARM: linker script: factor out unwinding table sections
authorNicolas Pitre <nicolas.pitre@linaro.org>
Thu, 1 Mar 2018 22:32:28 +0000 (17:32 -0500)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Sat, 10 Mar 2018 01:19:55 +0000 (20:19 -0500)
Signed-off-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Chris Brandt <Chris.Brandt@renesas.com>
arch/arm/kernel/vmlinux-xip.lds.S
arch/arm/kernel/vmlinux.lds.S
arch/arm/kernel/vmlinux.lds.h

index 4ddb547..6504870 100644 (file)
@@ -66,20 +66,7 @@ SECTIONS
        }
 
 #ifdef CONFIG_ARM_UNWIND
-       /*
-        * Stack unwinding tables
-        */
-       . = ALIGN(8);
-       .ARM.unwind_idx : {
-               __start_unwind_idx = .;
-               *(.ARM.exidx*)
-               __stop_unwind_idx = .;
-       }
-       .ARM.unwind_tab : {
-               __start_unwind_tab = .;
-               *(.ARM.extab*)
-               __stop_unwind_tab = .;
-       }
+       ARM_UNWIND_SECTIONS
 #endif
 
        NOTES
index a02a96c..3b375d8 100644 (file)
@@ -74,20 +74,7 @@ SECTIONS
        }
 
 #ifdef CONFIG_ARM_UNWIND
-       /*
-        * Stack unwinding tables
-        */
-       . = ALIGN(8);
-       .ARM.unwind_idx : {
-               __start_unwind_idx = .;
-               *(.ARM.exidx*)
-               __stop_unwind_idx = .;
-       }
-       .ARM.unwind_tab : {
-               __start_unwind_tab = .;
-               *(.ARM.extab*)
-               __stop_unwind_tab = .;
-       }
+       ARM_UNWIND_SECTIONS
 #endif
 
        NOTES
index 0ef86d7..566a7b4 100644 (file)
                . = ALIGN(4);                                           \
                *(.got)                 /* Global offset table */       \
                ARM_CPU_KEEP(PROC_INFO)
+
+/* Stack unwinding tables */
+#define ARM_UNWIND_SECTIONS                                            \
+       . = ALIGN(8);                                                   \
+       .ARM.unwind_idx : {                                             \
+               __start_unwind_idx = .;                                 \
+               *(.ARM.exidx*)                                          \
+               __stop_unwind_idx = .;                                  \
+       }                                                               \
+       .ARM.unwind_tab : {                                             \
+               __start_unwind_tab = .;                                 \
+               *(.ARM.extab*)                                          \
+               __stop_unwind_tab = .;                                  \
+       }