Blackfin: add support for GENERIC_BUG
[firefly-linux-kernel-4.4.55.git] / arch / blackfin / kernel / vmlinux.lds.S
index 8b67167cb4f4cdeac39c465c0be0a5ba4f52711e..119fbdb464752e112e737a2d1f4cc97fdb6cdeb6 100644 (file)
@@ -166,6 +166,20 @@ SECTIONS
        }
        PERCPU(4)
        SECURITY_INIT
+
+       /* we have to discard exit text and such at runtime, not link time, to
+        * handle embedded cross-section references (alt instructions, bug
+        * table, eh_frame, etc...)
+        */
+       .exit.text :
+       {
+               EXIT_TEXT
+       }
+       .exit.data :
+       {
+               EXIT_DATA
+       }
+
        .init.ramfs :
        {
                . = ALIGN(4);
@@ -264,8 +278,6 @@ SECTIONS
 
        /DISCARD/ :
        {
-               EXIT_TEXT
-               EXIT_DATA
                *(.exitcall.exit)
        }
 }