This patch series cleans up the section names on the frv
architecture. It requires the architecture-independent macro
definitions from this patch series:
<http://www.spinics.net/lists/mips/msg33499.html>
The long-term goal here is to add support for building the kernel with
-ffunction-sections -fdata-sections. This requires renaming all the
magic section names in the kernel of the form .text.foo, .data.foo,
.bss.foo, and .rodata.foo to not have collisions with sections
generated for code like:
static int nosave = 0; /* -fdata-sections places in .data.nosave */
static void head(); /* -ffunction-sections places in .text.head */
Note that these patches have not been boot-tested (aside from testing
the analogous changes on x86), since I don't have access to the
appropriate hardware.
-Tim Abbott
Tim Abbott (3):
frv: use new macro for .data.cacheline_aligned section.
frv: use new macros for .data.init_task
frv: rename .text.foo sections to .text..foo.
arch/frv/kernel/break.S | 2 +-
arch/frv/kernel/entry.S | 2 +-
arch/frv/kernel/head.S | 2 +-
arch/frv/kernel/init_task.c | 3 +--
arch/frv/kernel/vmlinux.lds.S | 20 ++++++--------------
arch/frv/mm/tlb-miss.S | 2 +-
6 files changed, 11 insertions(+), 20 deletions(-)
.data.init_task should not need a separate output section; this change
moves it into the .data section.
Signed-off-by: Tim Abbott <[email protected]>
Cc: David Howells <[email protected]>
---
arch/frv/kernel/init_task.c | 3 +--
arch/frv/kernel/vmlinux.lds.S | 8 +-------
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/arch/frv/kernel/init_task.c b/arch/frv/kernel/init_task.c
index 29429a8..9f182b3 100644
--- a/arch/frv/kernel/init_task.c
+++ b/arch/frv/kernel/init_task.c
@@ -23,8 +23,7 @@ EXPORT_SYMBOL(init_mm);
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
*/
-union thread_union init_thread_union
- __attribute__((__section__(".data.init_task"))) =
+union thread_union init_thread_union __init_task_data =
{ INIT_THREAD_INFO(init_task) };
/*
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index dc61f3e..d19d3c0 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -69,13 +69,6 @@ SECTIONS
. = ALIGN(THREAD_SIZE);
__init_end = .;
- /* put sections together that have massive alignment issues */
- . = ALIGN(THREAD_SIZE);
- .data.init_task : {
- /* init task record & stack */
- *(.data.init_task)
- }
-
.trap : {
/* trap table management - read entry-table.S before modifying */
. = ALIGN(8192);
@@ -128,6 +121,7 @@ SECTIONS
_sdata = .;
.data : { /* Data */
+ INIT_TASK_DATA(THREAD_SIZE)
CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
DATA_DATA
*(.data.*)
--
1.6.2.1
.data.cacheline_aligned should not need a separate output section;
this change moves it into the .data section.
Signed-off-by: Tim Abbott <[email protected]>
Cc: David Howells <[email protected]>
---
arch/frv/kernel/vmlinux.lds.S | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index 22d9787..dc61f3e 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -76,9 +76,6 @@ SECTIONS
*(.data.init_task)
}
- . = ALIGN(L1_CACHE_BYTES);
- .data.cacheline_aligned : { *(.data.cacheline_aligned) }
-
.trap : {
/* trap table management - read entry-table.S before modifying */
. = ALIGN(8192);
@@ -131,6 +128,7 @@ SECTIONS
_sdata = .;
.data : { /* Data */
+ CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
DATA_DATA
*(.data.*)
EXIT_DATA
--
1.6.2.1
Using special sections with names of the form .text.foo causes
collisions with section names generated by -ffunction-sections.
Signed-off-by: Tim Abbott <[email protected]>
Cc: David Howells <[email protected]>
---
arch/frv/kernel/break.S | 2 +-
arch/frv/kernel/entry.S | 2 +-
arch/frv/kernel/head.S | 2 +-
arch/frv/kernel/vmlinux.lds.S | 8 ++++----
arch/frv/mm/tlb-miss.S | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/frv/kernel/break.S b/arch/frv/kernel/break.S
index bd0bdf9..8988468 100644
--- a/arch/frv/kernel/break.S
+++ b/arch/frv/kernel/break.S
@@ -63,7 +63,7 @@ __break_trace_through_exceptions:
# entry point for Break Exceptions/Interrupts
#
###############################################################################
- .section .text.break
+ .section .text..break
.balign 4
.globl __entry_break
__entry_break:
diff --git a/arch/frv/kernel/entry.S b/arch/frv/kernel/entry.S
index 1da523b..8958151 100644
--- a/arch/frv/kernel/entry.S
+++ b/arch/frv/kernel/entry.S
@@ -38,7 +38,7 @@
#define nr_syscalls ((syscall_table_size)/4)
- .section .text.entry
+ .section .text..entry
.balign 4
.macro LEDS val
diff --git a/arch/frv/kernel/head.S b/arch/frv/kernel/head.S
index b825ef3..e9a8cc6 100644
--- a/arch/frv/kernel/head.S
+++ b/arch/frv/kernel/head.S
@@ -542,7 +542,7 @@ __head_end:
.size _boot, .-_boot
# provide a point for GDB to place a break
- .section .text.start,"ax"
+ .section .text..start,"ax"
.globl _start
.balign 4
_start:
diff --git a/arch/frv/kernel/vmlinux.lds.S b/arch/frv/kernel/vmlinux.lds.S
index d19d3c0..bb1258f 100644
--- a/arch/frv/kernel/vmlinux.lds.S
+++ b/arch/frv/kernel/vmlinux.lds.S
@@ -84,10 +84,10 @@ SECTIONS
_text = .;
_stext = .;
.text : {
- *(.text.start)
- *(.text.entry)
- *(.text.break)
- *(.text.tlbmiss)
+ *(.text..start)
+ *(.text..entry)
+ *(.text..break)
+ *(.text..tlbmiss)
TEXT_TEXT
SCHED_TEXT
LOCK_TEXT
diff --git a/arch/frv/mm/tlb-miss.S b/arch/frv/mm/tlb-miss.S
index 7f392bc..f3ac019 100644
--- a/arch/frv/mm/tlb-miss.S
+++ b/arch/frv/mm/tlb-miss.S
@@ -15,7 +15,7 @@
#include <asm/pgtable.h>
#include <asm/spr-regs.h>
- .section .text.tlbmiss
+ .section .text..tlbmiss
.balign 4
.globl __entry_insn_mmu_miss
--
1.6.2.1