ARM: use linker magic for vectors and vector stubs
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / kernel / vmlinux.lds.S
index a871b8e00fca7d67141859bbb2415dadabbc1ad5..33f2ea32f5a03602d5fc3c52d1b4d4e108a84ed6 100644 (file)
@@ -152,6 +152,23 @@ SECTIONS
        . = ALIGN(PAGE_SIZE);
        __init_begin = .;
 #endif
+       /*
+        * The vectors and stubs are relocatable code, and the
+        * only thing that matters is their relative offsets
+        */
+       __vectors_start = .;
+       .vectors 0 : AT(__vectors_start) {
+               *(.vectors)
+       }
+       . = __vectors_start + SIZEOF(.vectors);
+       __vectors_end = .;
+
+       __stubs_start = .;
+       .stubs 0x1000 : AT(__stubs_start) {
+               *(.stubs)
+       }
+       . = __stubs_start + SIZEOF(.stubs);
+       __stubs_end = .;
 
        INIT_TEXT_SECTION(8)
        .exit.text : {