From: tip-bot for Sam Ravnborg <sam@ravnborg.org>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com,
torvalds@linux-foundation.org, sam@ravnborg.org, tabbott@MIT.EDU,
tglx@linutronix.de, mingo@elte.hu
Subject: [tip:x86/kbuild] x86, vmlinux.lds: unify first part of initdata
Date: Wed, 29 Apr 2009 09:04:57 GMT [thread overview]
Message-ID: <tip-e58bdaa8f810332e5c1760ce496b01e07d51642c@git.kernel.org> (raw)
In-Reply-To: <1240991249-27117-9-git-send-email-sam@ravnborg.org>
Commit-ID: e58bdaa8f810332e5c1760ce496b01e07d51642c
Gitweb: http://git.kernel.org/tip/e58bdaa8f810332e5c1760ce496b01e07d51642c
Author: Sam Ravnborg <sam@ravnborg.org>
AuthorDate: Wed, 29 Apr 2009 09:47:25 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Wed, 29 Apr 2009 10:20:33 +0200
x86, vmlinux.lds: unify first part of initdata
32-bit:
- Move definition of __init_begin outside output_section
because it covers more than one section
- Move ALIGN() for end-of-section inside .smp_locks output section.
Same effect but the intent is better documented that
we need both start and end aligned.
64-bit:
- Move ALIGN() outside output section in .init.setup
- Deleted unused __smp_alt_* symbols
None of the above should result in any functional change.
[ Impact: refactor and unify linker script ]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Tim Abbott <tabbott@MIT.EDU>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
LKML-Reference: <1240991249-27117-9-git-send-email-sam@ravnborg.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
arch/x86/kernel/vmlinux.lds.S | 61 ++++++++++++++++++++++++++++++++++++++
arch/x86/kernel/vmlinux_32.lds.S | 60 -------------------------------------
arch/x86/kernel/vmlinux_64.lds.S | 59 ------------------------------------
3 files changed, 61 insertions(+), 119 deletions(-)
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index b3106c2..8b203c4 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -231,6 +231,67 @@ SECTIONS
#endif /* CONFIG_X86_64 */
+ /* init_task */
+ . = ALIGN(THREAD_SIZE);
+ .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
+ *(.data.init_task)
+ }
+#ifdef CONFIG_X86_64
+ :data.init
+#endif
+
+ /*
+ * smp_locks might be freed after init
+ * start/end must be page aligned
+ */
+ . = ALIGN(PAGE_SIZE);
+ .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
+ __smp_locks = .;
+ *(.smp_locks)
+ __smp_locks_end = .;
+ . = ALIGN(PAGE_SIZE);
+ }
+
+ /* Init code and data - will be freed after init */
+ . = ALIGN(PAGE_SIZE);
+ __init_begin = .; /* paired with __init_end */
+ .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
+ _sinittext = .;
+ INIT_TEXT
+ _einittext = .;
+ }
+
+ .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
+ INIT_DATA
+ }
+
+ . = ALIGN(16);
+ .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
+ __setup_start = .;
+ *(.init.setup)
+ __setup_end = .;
+ }
+ .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
+ __initcall_start = .;
+ INITCALLS
+ __initcall_end = .;
+ }
+
+ .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
+ __con_initcall_start = .;
+ *(.con_initcall.init)
+ __con_initcall_end = .;
+ }
+
+ .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
+ __x86_cpu_dev_start = .;
+ *(.x86_cpu_dev.init)
+ __x86_cpu_dev_end = .;
+ }
+
+ SECURITY_INIT
+
+
#ifdef CONFIG_X86_32
# include "vmlinux_32.lds.S"
#else
diff --git a/arch/x86/kernel/vmlinux_32.lds.S b/arch/x86/kernel/vmlinux_32.lds.S
index 8ade846..d8ba539 100644
--- a/arch/x86/kernel/vmlinux_32.lds.S
+++ b/arch/x86/kernel/vmlinux_32.lds.S
@@ -1,63 +1,3 @@
- /* init_task */
- . = ALIGN(THREAD_SIZE);
- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
- *(.data.init_task)
- }
-
- . = ALIGN(PAGE_SIZE);
- .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
- /* might get freed after init */
- __smp_locks = .;
- *(.smp_locks)
- __smp_locks_end = .;
- }
- /* will be freed after init
- * Following ALIGN() is required to make sure no other data falls on the
- * same page where __smp_alt_end is pointing as that page might be freed
- * after boot. Always make sure that ALIGN() directive is present after
- * the section which contains __smp_alt_end.
- */
- . = ALIGN(PAGE_SIZE);
-
- /* Init code and data - will be freed after init */
- . = ALIGN(PAGE_SIZE);
- .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
- __init_begin = .;
- _sinittext = .;
- INIT_TEXT
- _einittext = .;
- }
-
- .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
- INIT_DATA
- }
-
- . = ALIGN(16);
- .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
- __setup_start = .;
- *(.init.setup)
- __setup_end = .;
- }
- .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
- __initcall_start = .;
- INITCALLS
- __initcall_end = .;
- }
-
- .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
- __con_initcall_start = .;
- *(.con_initcall.init)
- __con_initcall_end = .;
- }
-
- .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
- __x86_cpu_dev_start = .;
- *(.x86_cpu_dev.init)
- __x86_cpu_dev_end = .;
- }
-
- SECURITY_INIT
-
. = ALIGN(4);
.altinstructions : AT(ADDR(.altinstructions) - LOAD_OFFSET) {
__alt_instructions = .;
diff --git a/arch/x86/kernel/vmlinux_64.lds.S b/arch/x86/kernel/vmlinux_64.lds.S
index 013aa0e..0e8054e 100644
--- a/arch/x86/kernel/vmlinux_64.lds.S
+++ b/arch/x86/kernel/vmlinux_64.lds.S
@@ -1,62 +1,3 @@
- /* init_task */
- .data.init_task : AT(ADDR(.data.init_task) - LOAD_OFFSET) {
- . = ALIGN(THREAD_SIZE);
- *(.data.init_task)
- } :data.init
-
- .smp_locks : AT(ADDR(.smp_locks) - LOAD_OFFSET) {
- /* might get freed after init */
- . = ALIGN(PAGE_SIZE);
- __smp_alt_begin = .;
- __smp_locks = .;
- *(.smp_locks)
- __smp_locks_end = .;
- . = ALIGN(PAGE_SIZE);
- __smp_alt_end = .;
- }
-
- /* Init code and data */
- . = ALIGN(PAGE_SIZE);
- __init_begin = .; /* paired with __init_end */
- .init.text : AT(ADDR(.init.text) - LOAD_OFFSET) {
- _sinittext = .;
- INIT_TEXT
- _einittext = .;
- }
-
- .init.data : AT(ADDR(.init.data) - LOAD_OFFSET) {
- __initdata_begin = .;
- INIT_DATA
- __initdata_end = .;
- }
-
- .init.setup : AT(ADDR(.init.setup) - LOAD_OFFSET) {
- . = ALIGN(16);
- __setup_start = .;
- *(.init.setup)
- __setup_end = .;
- }
-
- .initcall.init : AT(ADDR(.initcall.init) - LOAD_OFFSET) {
- __initcall_start = .;
- INITCALLS
- __initcall_end = .;
- }
-
- .con_initcall.init : AT(ADDR(.con_initcall.init) - LOAD_OFFSET) {
- __con_initcall_start = .;
- *(.con_initcall.init)
- __con_initcall_end = .;
- }
-
- .x86_cpu_dev.init : AT(ADDR(.x86_cpu_dev.init) - LOAD_OFFSET) {
- __x86_cpu_dev_start = .;
- *(.x86_cpu_dev.init)
- __x86_cpu_dev_end = .;
- }
-
- SECURITY_INIT
-
. = ALIGN(8);
.parainstructions : AT(ADDR(.parainstructions) - LOAD_OFFSET) {
__parainstructions = .;
next prev parent reply other threads:[~2009-04-29 9:08 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 7:35 [PATCH/RFT 0/13] x86: unify vmlinux.lds Sam Ravnborg
2009-04-29 7:47 ` [PATCH 01/13] x86: beautify vmlinux_32.lds.S Sam Ravnborg
2009-04-29 9:03 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 02/13] x86, vmlinux.lds: unify header/footer Sam Ravnborg
2009-04-29 8:04 ` Ingo Molnar
2009-04-29 8:14 ` Ingo Molnar
2009-04-29 8:25 ` Sam Ravnborg
2009-04-29 8:37 ` Ingo Molnar
2009-04-29 8:51 ` Sam Ravnborg
2009-04-29 9:03 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 9:05 ` [tip:x86/kbuild] x86, vmlinux.lds: add copyright tip-bot for Ingo Molnar
2009-04-29 7:47 ` [PATCH 03/13] x86, vmlinux.lds: unify PHDRS Sam Ravnborg
2009-04-29 9:03 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 04/13] x86, vmlinux.lds: unify start/end of SECTIONS Sam Ravnborg
2009-04-29 9:04 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 05/13] x86, vmlinux.lds: unify .text output sections Sam Ravnborg
2009-04-29 9:04 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 06/13] x86, vmlinux.lds: unify exceptiontable Sam Ravnborg
2009-04-29 9:04 ` [tip:x86/kbuild] x86, vmlinux.lds: unify exception table tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 07/13] x86, vmlinux.lds: unify data output sections Sam Ravnborg
2009-04-29 9:04 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 08/13] x86, vmlinux.lds: move vsyscall " Sam Ravnborg
2009-04-29 9:04 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 09/13] x86, vmlinux.lds: unify first part of initdata Sam Ravnborg
2009-04-29 9:04 ` tip-bot for Sam Ravnborg [this message]
2009-04-29 7:47 ` [PATCH 10/13] x86, vmlinux.lds: unify parainstructions Sam Ravnborg
2009-04-29 9:05 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 11/13] x86, vmlinux.lds: unify .exit.* and .init.ramfs Sam Ravnborg
2009-04-29 9:05 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 12/13] x86, vmlinux.lds: unify percpu Sam Ravnborg
2009-04-29 9:05 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:47 ` [PATCH 13/13] x86, vmlinux.lds: unify remaining parts Sam Ravnborg
2009-04-29 9:05 ` [tip:x86/kbuild] " tip-bot for Sam Ravnborg
2009-04-29 7:57 ` [PATCH/RFT 0/13] x86: unify vmlinux.lds Ingo Molnar
2009-04-29 8:23 ` Sam Ravnborg
2009-04-29 8:31 ` Ingo Molnar
2009-04-29 9:04 ` Ingo Molnar
2009-04-29 10:00 ` Ingo Molnar
2009-04-29 10:50 ` Sam Ravnborg
2009-04-29 10:59 ` Ingo Molnar
2009-04-29 11:05 ` [tip:x86/kbuild] x86, vmlinux.lds: fix relocatable symbols tip-bot for Ingo Molnar
2009-04-29 11:34 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-e58bdaa8f810332e5c1760ce496b01e07d51642c@git.kernel.org \
--to=sam@ravnborg.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tabbott@MIT.EDU \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox