summaryrefslogtreecommitdiff
path: root/arch/frv/kernel/vmlinux.lds.S
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2007-11-29 03:22:05 +0300
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-29 20:24:54 +0300
commit3c835670ab5f72a4ea2d0db232b1acc07924f186 (patch)
tree32d632e21f6788427d6d7a0a3ae538e124c82c1d /arch/frv/kernel/vmlinux.lds.S
parent9e6c1e633355b69803094ecbac4cecc96e00965c (diff)
downloadlinux-3c835670ab5f72a4ea2d0db232b1acc07924f186.tar.xz
FRV: arrange things such that BRA can reach from the trap table
Arrange the sections in the FRV arch so that a BRA instruction with a 16-bit displacement can always reach from the trap table to entry.S, tlb-miss.S and break.S. The problem otherwise is that the linker can insert sufficient code between the slots in the trap table and the targets of the branch instructions in those slots that the displacement field in the instruction isn't sufficiently large. This is because the branch targets were in the .text section along with most of the other code in the kernel. Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/frv/kernel/vmlinux.lds.S')
-rw-r--r--arch/frv/kernel/vmlinux.lds.S27
1 files changed, 15 insertions, 12 deletions
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index 3b71e0c86399..a17a81d58bf6 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -76,6 +76,12 @@ SECTIONS
*(.data.init_task)
}
+ . = ALIGN(4096);
+ .data.page_aligned : { *(.data.idt) }
+
+ . = ALIGN(L1_CACHE_BYTES);
+ .data.cacheline_aligned : { *(.data.cacheline_aligned) }
+
.trap : {
/* trap table management - read entry-table.S before modifying */
. = ALIGN(8192);
@@ -86,28 +92,25 @@ SECTIONS
*(.trap.break)
}
- . = ALIGN(4096);
- .data.page_aligned : { *(.data.idt) }
-
- . = ALIGN(L1_CACHE_BYTES);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
-
/* Text and read-only data */
. = ALIGN(4);
_text = .;
_stext = .;
.text : {
- *(
- .text.start .text.*
+ *(.text.start)
+ *(.text.entry)
+ *(.text.break)
+ *(.text.tlbmiss)
+ TEXT_TEXT
+ SCHED_TEXT
+ LOCK_TEXT
#ifdef CONFIG_DEBUG_INFO
+ *(
.init.text
.exit.text
.exitcall.exit
-#endif
)
- TEXT_TEXT
- SCHED_TEXT
- LOCK_TEXT
+#endif
*(.fixup)
*(.gnu.warning)
*(.exitcall.exit)