diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-07-03 18:03:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:07:34 -0400 |
commit | 06256f8f719917581a221221bb851fcf88de564b (patch) | |
tree | b2a8753786b1d19993df813a933069c1dc18cb09 /arch | |
parent | 2e555f8d0f81d8e28a63fe432ec7bcc26e95006b (diff) |
c6x: normalize global variables exported by vmlinux.lds
Normalize global variables exported by vmlinux.lds to conform usage
guidelines from include/asm-generic/sections.h.
Use _text to mark the start of the kernel image including the head text,
and _stext to mark the start of the .text section.
This patch also fixes possible bugs due to current address layout that
[__init_begin, __init_end] is a sub-range of [_stext, _etext] and pages
within range [__init_begin, __init_end] will be freed by free_initmem().
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Mark Salter <msalter@redhat.com>
Cc: Aurelien Jacquiot <a-jacquiot@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/c6x/kernel/vmlinux.lds.S | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/c6x/kernel/vmlinux.lds.S b/arch/c6x/kernel/vmlinux.lds.S index 1d81c4c129ec..279d80725128 100644 --- a/arch/c6x/kernel/vmlinux.lds.S +++ b/arch/c6x/kernel/vmlinux.lds.S | |||
@@ -54,16 +54,15 @@ SECTIONS | |||
54 | } | 54 | } |
55 | 55 | ||
56 | . = ALIGN(PAGE_SIZE); | 56 | . = ALIGN(PAGE_SIZE); |
57 | __init_begin = .; | ||
57 | .init : | 58 | .init : |
58 | { | 59 | { |
59 | _stext = .; | ||
60 | _sinittext = .; | 60 | _sinittext = .; |
61 | HEAD_TEXT | 61 | HEAD_TEXT |
62 | INIT_TEXT | 62 | INIT_TEXT |
63 | _einittext = .; | 63 | _einittext = .; |
64 | } | 64 | } |
65 | 65 | ||
66 | __init_begin = _stext; | ||
67 | INIT_DATA_SECTION(16) | 66 | INIT_DATA_SECTION(16) |
68 | 67 | ||
69 | PERCPU_SECTION(128) | 68 | PERCPU_SECTION(128) |
@@ -74,6 +73,7 @@ SECTIONS | |||
74 | .text : | 73 | .text : |
75 | { | 74 | { |
76 | _text = .; | 75 | _text = .; |
76 | _stext = .; | ||
77 | TEXT_TEXT | 77 | TEXT_TEXT |
78 | SCHED_TEXT | 78 | SCHED_TEXT |
79 | LOCK_TEXT | 79 | LOCK_TEXT |