Commit 6eb10bc9 authored by Nelson Elhage's avatar Nelson Elhage Committed by Ralf Baechle

MIPS: Clean up linker script using new linker script macros.

This patch results in fewer output sections and in some data being
reordered, but should have no functional impact.
Signed-off-by: default avatarNelson Elhage <nelhage@ksplice.com>
Signed-off-by: default avatarTim Abbott <tabbott@ksplice.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent a0b54e25
...@@ -43,13 +43,7 @@ SECTIONS ...@@ -43,13 +43,7 @@ SECTIONS
} :text = 0 } :text = 0
_etext = .; /* End of text section */ _etext = .; /* End of text section */
/* Exception table */ EXCEPTION_TABLE(16)
. = ALIGN(16);
__ex_table : {
__start___ex_table = .;
*(__ex_table)
__stop___ex_table = .;
}
/* Exception table for data bus errors */ /* Exception table for data bus errors */
__dbe_table : { __dbe_table : {
...@@ -66,20 +60,10 @@ SECTIONS ...@@ -66,20 +60,10 @@ SECTIONS
/* writeable */ /* writeable */
.data : { /* Data */ .data : { /* Data */
. = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */ . = . + DATAOFFSET; /* for CONFIG_MAPPED_KERNEL */
/*
* This ALIGN is needed as a workaround for a bug a
* gcc bug upto 4.1 which limits the maximum alignment
* to at most 32kB and results in the following
* warning:
*
* CC arch/mips/kernel/init_task.o
* arch/mips/kernel/init_task.c:30: warning: alignment
* of init_thread_union is greater than maximum
* object file alignment. Using 32768
*/
. = ALIGN(PAGE_SIZE);
*(.data.init_task)
INIT_TASK_DATA(PAGE_SIZE)
NOSAVE_DATA
CACHELINE_ALIGNED_DATA(1 << CONFIG_MIPS_L1_CACHE_SHIFT)
DATA_DATA DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
...@@ -96,51 +80,13 @@ SECTIONS ...@@ -96,51 +80,13 @@ SECTIONS
.sdata : { .sdata : {
*(.sdata) *(.sdata)
} }
. = ALIGN(PAGE_SIZE);
.data_nosave : {
__nosave_begin = .;
*(.data.nosave)
}
. = ALIGN(PAGE_SIZE);
__nosave_end = .;
. = ALIGN(1 << CONFIG_MIPS_L1_CACHE_SHIFT);
.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 */
. = ALIGN(PAGE_SIZE); /* Init code and data */ . = ALIGN(PAGE_SIZE); /* Init code and data */
__init_begin = .; __init_begin = .;
.init.text : { INIT_TEXT_SECTION(PAGE_SIZE)
_sinittext = .; INIT_DATA_SECTION(16)
INIT_TEXT
_einittext = .;
}
.init.data : {
INIT_DATA
}
. = ALIGN(16);
.init.setup : {
__setup_start = .;
*(.init.setup)
__setup_end = .;
}
.initcall.init : {
__initcall_start = .;
INITCALLS
__initcall_end = .;
}
.con_initcall.init : {
__con_initcall_start = .;
*(.con_initcall.init)
__con_initcall_end = .;
}
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
...@@ -151,29 +97,13 @@ SECTIONS ...@@ -151,29 +97,13 @@ SECTIONS
.exit.data : { .exit.data : {
EXIT_DATA EXIT_DATA
} }
#if defined(CONFIG_BLK_DEV_INITRD)
. = ALIGN(PAGE_SIZE);
.init.ramfs : {
__initramfs_start = .;
*(.init.ramfs)
__initramfs_end = .;
}
#endif
PERCPU(PAGE_SIZE) PERCPU(PAGE_SIZE)
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
__init_end = .; __init_end = .;
/* freed after init ends here */ /* freed after init ends here */
__bss_start = .; /* BSS */ BSS_SECTION(0, 0, 0)
.sbss : {
*(.sbss)
*(.scommon)
}
.bss : {
*(.bss)
*(COMMON)
}
__bss_stop = .;
_end = . ; _end = . ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment