kbuild: Fix .text.unlikely placement
authorAndi Kleen <ak@linux.intel.com>
Mon, 20 Jul 2015 01:01:19 +0000 (18:01 -0700)
committerMichal Marek <mmarek@suse.com>
Thu, 20 Aug 2015 12:55:54 +0000 (14:55 +0200)
When building a kernel with .text.unlikely text the unlikely text for
each translation unit was put next to the main .text code in the
final vmlinux.

The problem is that the linker doesn't allow more specific submatches
of a section name in a different linker script statement after the
main match.

So we need to move them all into one line. With that change
.text.unlikely is at the end of everything again.

I also moved .text.hot into the same statement though, even though
that's not strictly needed.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
include/asm-generic/vmlinux.lds.h

index 8bd374d3cf21fb0ee32e217f7f7eb6915c992514..1781e54ea6d30791796c450df64240dff720fbbf 100644 (file)
  * during second ld run in second ld pass when generating System.map */
 #define TEXT_TEXT                                                      \
                ALIGN_FUNCTION();                                       \
-               *(.text.hot)                                            \
-               *(.text .text.fixup)                                    \
+               *(.text.hot .text .text.fixup .text.unlikely)           \
                *(.ref.text)                                            \
        MEM_KEEP(init.text)                                             \
        MEM_KEEP(exit.text)                                             \
-               *(.text.unlikely)
 
 
 /* sched.text is aling to function alignment to secure we have same
This page took 0.026405 seconds and 5 git commands to generate.