Commit ca967258 authored by Sam Ravnborg's avatar Sam Ravnborg

all-archs: consolidate .data section definition in asm-generic

With this consolidation we can now modify the .data
section definition in one spot for all archs.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 7664709b
...@@ -89,7 +89,7 @@ SECTIONS ...@@ -89,7 +89,7 @@ SECTIONS
_data = .; _data = .;
.data : { /* Data */ .data : { /* Data */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -158,7 +158,7 @@ SECTIONS ...@@ -158,7 +158,7 @@ SECTIONS
/* /*
* and the usual data section * and the usual data section
*/ */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
_edata = .; _edata = .;
......
...@@ -111,7 +111,7 @@ SECTIONS ...@@ -111,7 +111,7 @@ SECTIONS
/* /*
* and the usual data section * and the usual data section
*/ */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
*(.init.data) *(.init.data)
......
...@@ -106,7 +106,7 @@ SECTIONS ...@@ -106,7 +106,7 @@ SECTIONS
/* /*
* and the usual data section * and the usual data section
*/ */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
_edata = .; _edata = .;
......
...@@ -112,7 +112,7 @@ SECTIONS ...@@ -112,7 +112,7 @@ SECTIONS
/* And the rest... */ /* And the rest... */
*(.data.rel*) *(.data.rel*)
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
_edata = .; _edata = .;
......
...@@ -200,7 +200,7 @@ SECTIONS ...@@ -200,7 +200,7 @@ SECTIONS
__sdata = .; __sdata = .;
. = ALIGN(0x2000); . = ALIGN(0x2000);
*(.data.init_task) *(.data.init_task)
*(.data) DATA_DATA
. = ALIGN(32); . = ALIGN(32);
*(.data.cacheline_aligned) *(.data.cacheline_aligned)
......
...@@ -136,7 +136,8 @@ SECTIONS ...@@ -136,7 +136,8 @@ SECTIONS
_sdata = .; _sdata = .;
.data : { /* Data */ .data : { /* Data */
*(.data .data.*) DATA_DATA
*(.data.*)
*(.exit.data) *(.exit.data)
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -103,7 +103,7 @@ SECTIONS ...@@ -103,7 +103,7 @@ SECTIONS
. = ALIGN(0x2000) ; . = ALIGN(0x2000) ;
*(.data.init_task) *(.data.init_task)
. = ALIGN(0x4) ; . = ALIGN(0x4) ;
*(.data) DATA_DATA
. = ALIGN(0x4) ; . = ALIGN(0x4) ;
*(.data.*) *(.data.*)
......
...@@ -74,7 +74,7 @@ SECTIONS ...@@ -74,7 +74,7 @@ SECTIONS
/* writeable */ /* writeable */
. = ALIGN(4096); . = ALIGN(4096);
.data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */ .data : AT(ADDR(.data) - LOAD_OFFSET) { /* Data */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} :data } :data
......
...@@ -214,7 +214,12 @@ SECTIONS ...@@ -214,7 +214,12 @@ SECTIONS
data : { } :data data : { } :data
.data : AT(ADDR(.data) - LOAD_OFFSET) .data : AT(ADDR(.data) - LOAD_OFFSET)
{ *(.data) *(.data1) *(.gnu.linkonce.d*) CONSTRUCTORS } {
DATA_DATA
*(.data1)
*(.gnu.linkonce.d*)
CONSTRUCTORS
}
. = ALIGN(16); /* gp must be 16-byte aligned for exc. table */ . = ALIGN(16); /* gp must be 16-byte aligned for exc. table */
.got : AT(ADDR(.got) - LOAD_OFFSET) .got : AT(ADDR(.got) - LOAD_OFFSET)
......
...@@ -50,7 +50,7 @@ SECTIONS ...@@ -50,7 +50,7 @@ SECTIONS
.data : { /* Data */ .data : { /* Data */
*(.spu) *(.spu)
*(.spi) *(.spi)
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -28,7 +28,7 @@ SECTIONS ...@@ -28,7 +28,7 @@ SECTIONS
_etext = .; /* End of text section */ _etext = .; /* End of text section */
.data : { /* Data */ .data : { /* Data */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -23,7 +23,7 @@ SECTIONS ...@@ -23,7 +23,7 @@ SECTIONS
_etext = .; /* End of text section */ _etext = .; /* End of text section */
.data : { /* Data */ .data : { /* Data */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
. = ALIGN(16); /* Exception table */ . = ALIGN(16); /* Exception table */
__start___ex_table = .; __start___ex_table = .;
......
...@@ -133,7 +133,7 @@ SECTIONS { ...@@ -133,7 +133,7 @@ SECTIONS {
.data DATA_ADDR : { .data DATA_ADDR : {
. = ALIGN(4); . = ALIGN(4);
_sdata = . ; _sdata = . ;
*(.data) DATA_DATA
. = ALIGN(8192) ; . = ALIGN(8192) ;
*(.data.init_task) *(.data.init_task)
_edata = . ; _edata = . ;
......
...@@ -62,7 +62,7 @@ SECTIONS ...@@ -62,7 +62,7 @@ SECTIONS
. = ALIGN(_PAGE_SIZE); . = ALIGN(_PAGE_SIZE);
*(.data.init_task) *(.data.init_task)
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -91,7 +91,7 @@ SECTIONS ...@@ -91,7 +91,7 @@ SECTIONS
. = ALIGN(L1_CACHE_BYTES); . = ALIGN(L1_CACHE_BYTES);
.data : { /* Data */ .data : { /* Data */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -168,7 +168,7 @@ SECTIONS ...@@ -168,7 +168,7 @@ SECTIONS
#ifdef CONFIG_PPC32 #ifdef CONFIG_PPC32
.data : .data :
{ {
*(.data) DATA_DATA
*(.sdata) *(.sdata)
*(.got.plt) *(.got) *(.got.plt) *(.got)
} }
......
...@@ -67,7 +67,7 @@ SECTIONS ...@@ -67,7 +67,7 @@ SECTIONS
. = ALIGN(4096); . = ALIGN(4096);
.data : .data :
{ {
*(.data) DATA_DATA
*(.data1) *(.data1)
*(.sdata) *(.sdata)
*(.sdata2) *(.sdata2)
......
...@@ -48,7 +48,7 @@ SECTIONS ...@@ -48,7 +48,7 @@ SECTIONS
BUG_TABLE BUG_TABLE
.data : { /* Data */ .data : { /* Data */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -41,7 +41,7 @@ SECTIONS ...@@ -41,7 +41,7 @@ SECTIONS
BUG_TABLE BUG_TABLE
.data : { /* Data */ .data : { /* Data */
*(.data) DATA_DATA
/* Align the initial ramdisk image (INITRD) on page boundaries. */ /* Align the initial ramdisk image (INITRD) on page boundaries. */
. = ALIGN(PAGE_SIZE); . = ALIGN(PAGE_SIZE);
......
...@@ -78,7 +78,7 @@ SECTIONS ...@@ -78,7 +78,7 @@ SECTIONS
_etext = .; /* End of text section */ _etext = .; /* End of text section */
.data : C_PHYS(.data) { /* Data */ .data : C_PHYS(.data) { /* Data */
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -22,7 +22,7 @@ SECTIONS ...@@ -22,7 +22,7 @@ SECTIONS
RODATA RODATA
.data : .data :
{ {
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
.data1 : { *(.data1) } .data1 : { *(.data1) }
......
...@@ -27,7 +27,7 @@ SECTIONS ...@@ -27,7 +27,7 @@ SECTIONS
.data : .data :
{ {
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} }
.data1 : { *(.data1) } .data1 : { *(.data1) }
......
...@@ -99,7 +99,8 @@ SECTIONS ...@@ -99,7 +99,8 @@ SECTIONS
*(.data.init_task) *(.data.init_task)
. = ALIGN(KERNEL_STACK_SIZE); . = ALIGN(KERNEL_STACK_SIZE);
*(.data.init_irqstack) *(.data.init_irqstack)
*(.data .data.* .gnu.linkonce.d.*) DATA_DATA
*(.data.* .gnu.linkonce.d.*)
SORT(CONSTRUCTORS) SORT(CONSTRUCTORS)
} }
.data1 : { *(.data1) } .data1 : { *(.data1) }
......
...@@ -61,7 +61,7 @@ SECTIONS ...@@ -61,7 +61,7 @@ SECTIONS
*(.data.init_task) *(.data.init_task)
. = ALIGN(KERNEL_STACK_SIZE); . = ALIGN(KERNEL_STACK_SIZE);
*(.data.init_irqstack) *(.data.init_irqstack)
*(.data) DATA_DATA
*(.gnu.linkonce.d*) *(.gnu.linkonce.d*)
CONSTRUCTORS CONSTRUCTORS
} }
......
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
/* Kernel data segment. */ /* Kernel data segment. */
#define DATA_CONTENTS \ #define DATA_CONTENTS \
__sdata = . ; \ __sdata = . ; \
*(.data) \ DATA_DATA \
*(.exit.data) /* 2.5 convention */ \ *(.exit.data) /* 2.5 convention */ \
*(.data.exit) /* 2.4 convention */ \ *(.data.exit) /* 2.4 convention */ \
. = ALIGN (16) ; \ . = ALIGN (16) ; \
......
...@@ -55,7 +55,7 @@ SECTIONS ...@@ -55,7 +55,7 @@ SECTIONS
. = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */ . = ALIGN(PAGE_SIZE); /* Align data segment to page size boundary */
/* Data */ /* Data */
.data : AT(ADDR(.data) - LOAD_OFFSET) { .data : AT(ADDR(.data) - LOAD_OFFSET) {
*(.data) DATA_DATA
CONSTRUCTORS CONSTRUCTORS
} :data } :data
......
...@@ -145,7 +145,8 @@ SECTIONS ...@@ -145,7 +145,8 @@ SECTIONS
_fdata = .; _fdata = .;
.data : .data :
{ {
*(.data) CONSTRUCTORS DATA_DATA
CONSTRUCTORS
. = ALIGN(XCHAL_ICACHE_LINESIZE); . = ALIGN(XCHAL_ICACHE_LINESIZE);
*(.data.cacheline_aligned) *(.data.cacheline_aligned)
} }
......
...@@ -9,6 +9,10 @@ ...@@ -9,6 +9,10 @@
/* Align . to a 8 byte boundary equals to maximum function alignment. */ /* Align . to a 8 byte boundary equals to maximum function alignment. */
#define ALIGN_FUNCTION() . = ALIGN(8) #define ALIGN_FUNCTION() . = ALIGN(8)
/* .data section */
#define DATA_DATA \
*(.data)
#define RODATA \ #define RODATA \
. = ALIGN(4096); \ . = ALIGN(4096); \
.rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \ .rodata : AT(ADDR(.rodata) - LOAD_OFFSET) { \
......
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