diff options
author | Mark Salter <msalter@redhat.com> | 2013-11-04 11:38:47 -0500 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2013-11-04 13:17:25 -0500 |
commit | 3c620626c0cd4cfca856d70a846398275b48a768 (patch) | |
tree | 4b1b3a84fbcba11ad6604fa68b469925510a907a /arch/arm64 | |
parent | 264666e62848c19ba9252c80e895ffec9ad1d391 (diff) |
arm64: use generic RW_DATA_SECTION macro in linker script
The .data section in the arm64 linker script currently lacks a
definition for page-aligned data. This leads to a .page_aligned
section being placed between the end of data and start of bss.
This patch corrects that by using the generic RW_DATA_SECTION
macro which includes support for page-aligned data.
Signed-off-by: Mark Salter <msalter@redhat.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r-- | arch/arm64/kernel/vmlinux.lds.S | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 991ffddf49df..5161ad992091 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S | |||
@@ -96,30 +96,13 @@ SECTIONS | |||
96 | PERCPU_SECTION(64) | 96 | PERCPU_SECTION(64) |
97 | 97 | ||
98 | __init_end = .; | 98 | __init_end = .; |
99 | . = ALIGN(THREAD_SIZE); | 99 | |
100 | __data_loc = .; | 100 | . = ALIGN(PAGE_SIZE); |
101 | 101 | _data = .; | |
102 | .data : AT(__data_loc) { | 102 | __data_loc = _data - LOAD_OFFSET; |
103 | _data = .; /* address in memory */ | 103 | _sdata = .; |
104 | _sdata = .; | 104 | RW_DATA_SECTION(64, PAGE_SIZE, THREAD_SIZE) |
105 | 105 | _edata = .; | |
106 | /* | ||
107 | * first, the init task union, aligned | ||
108 | * to an 8192 byte boundary. | ||
109 | */ | ||
110 | INIT_TASK_DATA(THREAD_SIZE) | ||
111 | NOSAVE_DATA | ||
112 | CACHELINE_ALIGNED_DATA(64) | ||
113 | READ_MOSTLY_DATA(64) | ||
114 | |||
115 | /* | ||
116 | * and the usual data section | ||
117 | */ | ||
118 | DATA_DATA | ||
119 | CONSTRUCTORS | ||
120 | |||
121 | _edata = .; | ||
122 | } | ||
123 | _edata_loc = __data_loc + SIZEOF(.data); | 106 | _edata_loc = __data_loc + SIZEOF(.data); |
124 | 107 | ||
125 | BSS_SECTION(0, 0, 0) | 108 | BSS_SECTION(0, 0, 0) |