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 4ddb547b19b09db2984cd4a87c9806e85b5af8e4..65048708e4c699fc82238978743ccee6dcc89f54 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 a02a96c651f608ee8d4ca89a3cd0ee3cb9cab893..3b375d8ccb87ba9a7110d37998847ab64373267d 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 0ef86d75a0017ce1f35142430798cbe379ecf90e..566a7b42a02cfb679b76147b22128ae4d6504906 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 = .;                                  \
+       }