Skip to content

Commit

Permalink
ARM: vmlinux.lds: rearrange .init output section
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jul 7, 2011
1 parent 39df888 commit 1604d79
Showing 1 changed file with 29 additions and 18 deletions.
47 changes: 29 additions & 18 deletions arch/arm/kernel/vmlinux.lds.S
Original file line number Diff line number Diff line change
Expand Up @@ -65,48 +65,59 @@ SECTIONS
#else
. = PAGE_OFFSET + TEXT_OFFSET;
#endif

.init : { /* Init code and data */
.head.text : {
_stext = .;
_sinittext = .;
HEAD_TEXT
INIT_TEXT
ARM_EXIT_KEEP(EXIT_TEXT)
_einittext = .;
HEAD_TEXT
}
INIT_TEXT_SECTION(8)
.exit.text : {
ARM_EXIT_KEEP(EXIT_TEXT)
}
.init.proc.info : {
ARM_CPU_DISCARD(PROC_INFO)
}
.init.arch.info : {
__arch_info_begin = .;
*(.arch.info.init)
*(.arch.info.init)
__arch_info_end = .;
}
.init.tagtable : {
__tagtable_begin = .;
*(.taglist.init)
*(.taglist.init)
__tagtable_end = .;
}
#ifdef CONFIG_SMP_ON_UP
.init.smpalt : {
__smpalt_begin = .;
*(.alt.smp.init)
*(.alt.smp.init)
__smpalt_end = .;
}
#endif

.init.pv_table : {
__pv_table_begin = .;
*(.pv_table)
*(.pv_table)
__pv_table_end = .;

}
.init.data : {
#ifndef CONFIG_XIP_KERNEL
INIT_DATA
#endif
INIT_SETUP(16)

INIT_CALLS
CON_INITCALL
SECURITY_INITCALL
INIT_RAM_FS

}
#ifndef CONFIG_XIP_KERNEL
__init_begin = _stext;
INIT_DATA
.exit.data : {
ARM_EXIT_KEEP(EXIT_DATA)
#endif
}
#endif

PERCPU_SECTION(32)

#ifndef CONFIG_XIP_KERNEL
__init_begin = _stext;
. = ALIGN(PAGE_SIZE);
__init_end = .;
#endif
Expand Down

0 comments on commit 1604d79

Please sign in to comment.