Skip to content

Commit 9c88b25

Browse files
nelhagetorvalds
authored andcommitted
frv: clean up linker script using new linker script macros.
This is largely a straightforward conversion. The patch results in fewer output sections, and some data being reordered, but should have no functional impact. Also, note that this patch moves some data (namely, init_task and cacheline-aligned) inside [_sdata,_edata]. Because frv already builds using -ffunction-sections -fdata-sections, we can't use BSS_SECTION or RW_DATA_SECTION yet, since they do not currently include the required .bss.* and .data.* sections. Signed-off-by: Nelson Elhage <nelhage@ksplice.com> Acked-by: David Howells <dhowells@redhat.com> Signed-off-by: Tim Abbott <tabbott@ksplice.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 88ddb81 commit 9c88b25

File tree

1 file changed

+7
-54
lines changed

1 file changed

+7
-54
lines changed

arch/frv/kernel/vmlinux.lds.S

Lines changed: 7 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -35,45 +35,13 @@ SECTIONS
3535
#endif
3636
}
3737
_einittext = .;
38-
.init.data : { INIT_DATA }
39-
40-
. = ALIGN(8);
41-
__setup_start = .;
42-
.setup.init : { KEEP(*(.init.setup)) }
43-
__setup_end = .;
44-
45-
__initcall_start = .;
46-
.initcall.init : {
47-
INITCALLS
48-
}
49-
__initcall_end = .;
50-
__con_initcall_start = .;
51-
.con_initcall.init : { *(.con_initcall.init) }
52-
__con_initcall_end = .;
53-
SECURITY_INIT
5438

39+
INIT_DATA_SECTION(8)
5540
PERCPU(4096)
5641

57-
#ifdef CONFIG_BLK_DEV_INITRD
58-
. = ALIGN(4096);
59-
__initramfs_start = .;
60-
.init.ramfs : { *(.init.ramfs) }
61-
__initramfs_end = .;
62-
#endif
63-
64-
. = ALIGN(THREAD_SIZE);
42+
. = ALIGN(PAGE_SIZE);
6543
__init_end = .;
6644

67-
/* put sections together that have massive alignment issues */
68-
. = ALIGN(THREAD_SIZE);
69-
.data.init_task : {
70-
/* init task record & stack */
71-
*(.data.init_task)
72-
}
73-
74-
. = ALIGN(L1_CACHE_BYTES);
75-
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
76-
7745
.trap : {
7846
/* trap table management - read entry-table.S before modifying */
7947
. = ALIGN(8192);
@@ -119,13 +87,12 @@ SECTIONS
11987

12088
}
12189

122-
. = ALIGN(8); /* Exception table */
123-
__start___ex_table = .;
124-
__ex_table : { KEEP(*(__ex_table)) }
125-
__stop___ex_table = .;
90+
EXCEPTION_TABLE(8)
12691

12792
_sdata = .;
12893
.data : { /* Data */
94+
INIT_TASK_DATA(THREAD_SIZE)
95+
CACHELINE_ALIGNED_DATA(L1_CACHE_BYTES)
12996
DATA_DATA
13097
*(.data.*)
13198
EXIT_DATA
@@ -154,22 +121,8 @@ SECTIONS
154121
. = ALIGN(PAGE_SIZE);
155122
__kernel_image_end = .;
156123

157-
/* Stabs debugging sections. */
158-
.stab 0 : { *(.stab) }
159-
.stabstr 0 : { *(.stabstr) }
160-
.stab.excl 0 : { *(.stab.excl) }
161-
.stab.exclstr 0 : { *(.stab.exclstr) }
162-
.stab.index 0 : { *(.stab.index) }
163-
.stab.indexstr 0 : { *(.stab.indexstr) }
164-
165-
.debug_line 0 : { *(.debug_line) }
166-
.debug_info 0 : { *(.debug_info) }
167-
.debug_abbrev 0 : { *(.debug_abbrev) }
168-
.debug_aranges 0 : { *(.debug_aranges) }
169-
.debug_frame 0 : { *(.debug_frame) }
170-
.debug_pubnames 0 : { *(.debug_pubnames) }
171-
.debug_str 0 : { *(.debug_str) }
172-
.debug_ranges 0 : { *(.debug_ranges) }
124+
STABS_DEBUG
125+
DWARF_DEBUG
173126

174127
.comment 0 : { *(.comment) }
175128

0 commit comments

Comments
 (0)