From: Sami Tolvanen <samitolvanen@google.com>
To: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
"H . Peter Anvin" <hpa@zytor.com>,
Nicholas Piggin <npiggin@gmail.com>,
x86@kernel.org, linux-kernel@vger.kernel.org
Cc: Kees Cook <keescook@chromium.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Sami Tolvanen <samitolvanen@google.com>
Subject: [PATCH] x86: fix .bss with -fdata-sections
Date: Mon, 15 Apr 2019 09:49:56 -0700 [thread overview]
Message-ID: <20190415164956.124067-1-samitolvanen@google.com> (raw)
With LD_DEAD_CODE_DATA_ELIMINATION, we compile the kernel with
-fdata-sections, which also splits the .bss section. Use the
common BSS_MAIN macro in the linker script to properly merge all
the generated sections.
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
---
arch/x86/kernel/vmlinux.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S
index bad8c51fee6e..a5127b2c195f 100644
--- a/arch/x86/kernel/vmlinux.lds.S
+++ b/arch/x86/kernel/vmlinux.lds.S
@@ -362,7 +362,7 @@ SECTIONS
.bss : AT(ADDR(.bss) - LOAD_OFFSET) {
__bss_start = .;
*(.bss..page_aligned)
- *(.bss)
+ *(BSS_MAIN)
BSS_DECRYPTED
. = ALIGN(PAGE_SIZE);
__bss_stop = .;
--
2.21.0.392.gf8f6787159e-goog
next reply other threads:[~2019-04-15 16:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-15 16:49 Sami Tolvanen [this message]
2019-04-15 17:33 ` [PATCH] x86: fix .bss with -fdata-sections Nick Desaulniers
2019-04-16 3:23 ` Kees Cook
2019-04-16 6:25 ` [tip:x86/urgent] x86/build/lto: Fix truncated " tip-bot for Sami Tolvanen
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=20190415164956.124067-1-samitolvanen@google.com \
--to=samitolvanen@google.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ndesaulniers@google.com \
--cc=npiggin@gmail.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.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