Skip to content

Commit 1604d79

Browse files
author
Russell King
committed
ARM: vmlinux.lds: rearrange .init output section
Keep the various linker tables as separate output sections rather than combining them together into one big .init section. This makes the 'vmlinux' easier to see what is placed where. Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Tested-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
1 parent 39df888 commit 1604d79

1 file changed

Lines changed: 29 additions & 18 deletions

File tree

‎arch/arm/kernel/vmlinux.lds.S‎

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -65,48 +65,59 @@ SECTIONS
6565
#else
6666
. = PAGE_OFFSET + TEXT_OFFSET;
6767
#endif
68-
69-
.init : { /* Init code and data */
68+
.head.text : {
7069
_stext = .;
71-
_sinittext = .;
72-
HEAD_TEXT
73-
INIT_TEXT
74-
ARM_EXIT_KEEP(EXIT_TEXT)
75-
_einittext = .;
70+
HEAD_TEXT
71+
}
72+
INIT_TEXT_SECTION(8)
73+
.exit.text : {
74+
ARM_EXIT_KEEP(EXIT_TEXT)
75+
}
76+
.init.proc.info : {
7677
ARM_CPU_DISCARD(PROC_INFO)
78+
}
79+
.init.arch.info : {
7780
__arch_info_begin = .;
78-
*(.arch.info.init)
81+
*(.arch.info.init)
7982
__arch_info_end = .;
83+
}
84+
.init.tagtable : {
8085
__tagtable_begin = .;
81-
*(.taglist.init)
86+
*(.taglist.init)
8287
__tagtable_end = .;
88+
}
8389
#ifdef CONFIG_SMP_ON_UP
90+
.init.smpalt : {
8491
__smpalt_begin = .;
85-
*(.alt.smp.init)
92+
*(.alt.smp.init)
8693
__smpalt_end = .;
94+
}
8795
#endif
88-
96+
.init.pv_table : {
8997
__pv_table_begin = .;
90-
*(.pv_table)
98+
*(.pv_table)
9199
__pv_table_end = .;
92-
100+
}
101+
.init.data : {
102+
#ifndef CONFIG_XIP_KERNEL
103+
INIT_DATA
104+
#endif
93105
INIT_SETUP(16)
94-
95106
INIT_CALLS
96107
CON_INITCALL
97108
SECURITY_INITCALL
98109
INIT_RAM_FS
99-
110+
}
100111
#ifndef CONFIG_XIP_KERNEL
101-
__init_begin = _stext;
102-
INIT_DATA
112+
.exit.data : {
103113
ARM_EXIT_KEEP(EXIT_DATA)
104-
#endif
105114
}
115+
#endif
106116

107117
PERCPU_SECTION(32)
108118

109119
#ifndef CONFIG_XIP_KERNEL
120+
__init_begin = _stext;
110121
. = ALIGN(PAGE_SIZE);
111122
__init_end = .;
112123
#endif

0 commit comments

Comments
 (0)