[MIPS] Introduce a consistent style for vmlinux.lds.
This style will be consitent with all other arch's - soon. In addition: - Moved a few labels inside brackets for the sections they specify to prevent that linker alignmnet made them point before the section start Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
This commit is contained in:
committed by
Ralf Baechle
parent
d5ab1a6910
commit
0f5c906442
@@ -6,6 +6,7 @@
|
|||||||
OUTPUT_ARCH(mips)
|
OUTPUT_ARCH(mips)
|
||||||
ENTRY(kernel_entry)
|
ENTRY(kernel_entry)
|
||||||
jiffies = JIFFIES;
|
jiffies = JIFFIES;
|
||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_BOOT_ELF64
|
#ifdef CONFIG_BOOT_ELF64
|
||||||
@@ -16,8 +17,9 @@ SECTIONS
|
|||||||
/* . = 0xc00000000001c000; */
|
/* . = 0xc00000000001c000; */
|
||||||
|
|
||||||
/* Set the vaddr for the text segment to a value
|
/* Set the vaddr for the text segment to a value
|
||||||
>= 0xa800 0000 0001 9000 if no symmon is going to configured
|
* >= 0xa800 0000 0001 9000 if no symmon is going to configured
|
||||||
>= 0xa800 0000 0030 0000 otherwise */
|
* >= 0xa800 0000 0030 0000 otherwise
|
||||||
|
*/
|
||||||
|
|
||||||
/* . = 0xa800000000300000; */
|
/* . = 0xa800000000300000; */
|
||||||
/* . = 0xa800000000300000; */
|
/* . = 0xa800000000300000; */
|
||||||
@@ -33,20 +35,22 @@ SECTIONS
|
|||||||
*(.fixup)
|
*(.fixup)
|
||||||
*(.gnu.warning)
|
*(.gnu.warning)
|
||||||
} =0
|
} =0
|
||||||
|
|
||||||
_etext = .; /* End of text section */
|
_etext = .; /* End of text section */
|
||||||
|
|
||||||
. = ALIGN(16); /* Exception table */
|
/* Exception table */
|
||||||
|
. = ALIGN(16);
|
||||||
|
__ex_table : {
|
||||||
__start___ex_table = .;
|
__start___ex_table = .;
|
||||||
__ex_table : { *(__ex_table) }
|
*(__ex_table)
|
||||||
__stop___ex_table = .;
|
__stop___ex_table = .;
|
||||||
|
}
|
||||||
|
|
||||||
__start___dbe_table = .; /* Exception table for data bus errors */
|
/* Exception table for data bus errors */
|
||||||
__dbe_table : { *(__dbe_table) }
|
__dbe_table : {
|
||||||
|
__start___dbe_table = .;
|
||||||
|
*(__dbe_table)
|
||||||
__stop___dbe_table = .;
|
__stop___dbe_table = .;
|
||||||
|
}
|
||||||
NOTES
|
|
||||||
|
|
||||||
RODATA
|
RODATA
|
||||||
|
|
||||||
/* writeable */
|
/* writeable */
|
||||||
@@ -65,26 +69,34 @@ SECTIONS
|
|||||||
*(.data.init_task)
|
*(.data.init_task)
|
||||||
|
|
||||||
DATA_DATA
|
DATA_DATA
|
||||||
|
|
||||||
CONSTRUCTORS
|
CONSTRUCTORS
|
||||||
}
|
}
|
||||||
_gp = . + 0x8000;
|
_gp = . + 0x8000;
|
||||||
.lit8 : { *(.lit8) }
|
.lit8 : {
|
||||||
.lit4 : { *(.lit4) }
|
*(.lit8)
|
||||||
|
}
|
||||||
|
.lit4 : {
|
||||||
|
*(.lit4)
|
||||||
|
}
|
||||||
/* We want the small data sections together, so single-instruction offsets
|
/* We want the small data sections together, so single-instruction offsets
|
||||||
can access them all, and initialized data all before uninitialized, so
|
can access them all, and initialized data all before uninitialized, so
|
||||||
we can shorten the on-disk segment size. */
|
we can shorten the on-disk segment size. */
|
||||||
.sdata : { *(.sdata) }
|
.sdata : {
|
||||||
|
*(.sdata)
|
||||||
|
}
|
||||||
|
|
||||||
. = ALIGN(_PAGE_SIZE);
|
. = ALIGN(_PAGE_SIZE);
|
||||||
|
.data_nosave : {
|
||||||
__nosave_begin = .;
|
__nosave_begin = .;
|
||||||
.data_nosave : { *(.data.nosave) }
|
*(.data.nosave)
|
||||||
|
}
|
||||||
. = ALIGN(_PAGE_SIZE);
|
. = ALIGN(_PAGE_SIZE);
|
||||||
__nosave_end = .;
|
__nosave_end = .;
|
||||||
|
|
||||||
. = ALIGN(32);
|
. = ALIGN(32);
|
||||||
.data.cacheline_aligned : { *(.data.cacheline_aligned) }
|
.data.cacheline_aligned : {
|
||||||
|
*(.data.cacheline_aligned)
|
||||||
|
}
|
||||||
_edata = .; /* End of data section */
|
_edata = .; /* End of data section */
|
||||||
|
|
||||||
/* will be freed after init */
|
/* will be freed after init */
|
||||||
@@ -95,31 +107,45 @@ SECTIONS
|
|||||||
*(.init.text)
|
*(.init.text)
|
||||||
_einittext = .;
|
_einittext = .;
|
||||||
}
|
}
|
||||||
.init.data : { *(.init.data) }
|
.init.data : {
|
||||||
. = ALIGN(16);
|
*(.init.data)
|
||||||
__setup_start = .;
|
}
|
||||||
.init.setup : { *(.init.setup) }
|
. = ALIGN(16);
|
||||||
__setup_end = .;
|
.init.setup : {
|
||||||
|
__setup_start = .;
|
||||||
__initcall_start = .;
|
*(.init.setup)
|
||||||
.initcall.init : {
|
__setup_end = .;
|
||||||
INITCALLS
|
|
||||||
}
|
}
|
||||||
__initcall_end = .;
|
|
||||||
|
|
||||||
|
.initcall.init : {
|
||||||
|
__initcall_start = .;
|
||||||
|
INITCALLS
|
||||||
|
__initcall_end = .;
|
||||||
|
}
|
||||||
|
|
||||||
|
.con_initcall.init : {
|
||||||
__con_initcall_start = .;
|
__con_initcall_start = .;
|
||||||
.con_initcall.init : { *(.con_initcall.init) }
|
*(.con_initcall.init)
|
||||||
__con_initcall_end = .;
|
__con_initcall_end = .;
|
||||||
|
}
|
||||||
SECURITY_INIT
|
SECURITY_INIT
|
||||||
|
|
||||||
/* .exit.text is discarded at runtime, not link time, to deal with
|
/* .exit.text is discarded at runtime, not link time, to deal with
|
||||||
references from .rodata */
|
* references from .rodata
|
||||||
.exit.text : { *(.exit.text) }
|
*/
|
||||||
.exit.data : { *(.exit.data) }
|
.exit.text : {
|
||||||
|
*(.exit.text)
|
||||||
|
}
|
||||||
|
.exit.data : {
|
||||||
|
*(.exit.data)
|
||||||
|
}
|
||||||
#if defined(CONFIG_BLK_DEV_INITRD)
|
#if defined(CONFIG_BLK_DEV_INITRD)
|
||||||
. = ALIGN(_PAGE_SIZE);
|
. = ALIGN(_PAGE_SIZE);
|
||||||
|
.init.ramfs : {
|
||||||
__initramfs_start = .;
|
__initramfs_start = .;
|
||||||
.init.ramfs : { *(.init.ramfs) }
|
*(.init.ramfs)
|
||||||
__initramfs_end = .;
|
__initramfs_end = .;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
PERCPU(_PAGE_SIZE)
|
PERCPU(_PAGE_SIZE)
|
||||||
. = ALIGN(_PAGE_SIZE);
|
. = ALIGN(_PAGE_SIZE);
|
||||||
@@ -151,18 +177,31 @@ SECTIONS
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* These mark the ABI of the kernel for debuggers. */
|
/* These mark the ABI of the kernel for debuggers. */
|
||||||
.mdebug.abi32 : { KEEP(*(.mdebug.abi32)) }
|
.mdebug.abi32 : {
|
||||||
.mdebug.abi64 : { KEEP(*(.mdebug.abi64)) }
|
KEEP(*(.mdebug.abi32))
|
||||||
|
}
|
||||||
|
.mdebug.abi64 : {
|
||||||
|
KEEP(*(.mdebug.abi64))
|
||||||
|
}
|
||||||
|
|
||||||
/* This is the MIPS specific mdebug section. */
|
/* This is the MIPS specific mdebug section. */
|
||||||
.mdebug : { *(.mdebug) }
|
.mdebug : {
|
||||||
|
*(.mdebug)
|
||||||
|
}
|
||||||
|
|
||||||
STABS_DEBUG
|
STABS_DEBUG
|
||||||
|
|
||||||
DWARF_DEBUG
|
DWARF_DEBUG
|
||||||
|
|
||||||
/* These must appear regardless of . */
|
/* These must appear regardless of . */
|
||||||
.gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
|
.gptab.sdata : {
|
||||||
.gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
|
*(.gptab.data)
|
||||||
.note : { *(.note) }
|
*(.gptab.sdata)
|
||||||
|
}
|
||||||
|
.gptab.sbss : {
|
||||||
|
*(.gptab.bss)
|
||||||
|
*(.gptab.sbss)
|
||||||
|
}
|
||||||
|
.note : {
|
||||||
|
*(.note)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user