From: Josh Poimboeuf <jpoimboe@redhat.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@kernel.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: avoid warning for zero-filling .bss
Date: Thu, 17 Nov 2016 16:44:45 -0600 [thread overview]
Message-ID: <20161117224445.n3nerymee5jnrq75@treble> (raw)
In-Reply-To: <12902246.avh8vXRAfV@wuerfel>
On Thu, Nov 17, 2016 at 11:32:30PM +0100, Arnd Bergmann wrote:
> On Thursday, November 17, 2016 3:02:48 PM CET Josh Poimboeuf wrote:
> > On Wed, Nov 16, 2016 at 03:17:09PM +0100, Arnd Bergmann wrote:
> > > The latest binutils are warning about a .fill directive with an explicit
> > > value in a .bss section:
> > >
> > > arch/x86/kernel/head_32.S: Assembler messages:
> > > arch/x86/kernel/head_32.S:677: Warning: ignoring fill value in section `.bss..page_aligned'
> > > arch/x86/kernel/head_32.S:679: Warning: ignoring fill value in section `.bss..page_aligned'
> > >
> > > This comes from the 'ENTRY()' macro padding the space between the symbols
> > > with 'nop'. Open-coding the .globl directive without the padding
> > > avoids that warning.
> >
> > How is there space between the symbols? Aren't they already aligned?
>
> My understanding is that they are aligned, it's just that gas complains
> about the .align directive with a nonzero fill value.
Ah, I see now. In that case your patch looks fine to me.
Reviewed-by: Josh Poimboeuf <jpoimboe@redhat.com>
>
> > Isn't the warning really about the fact that it's unnecessarily filling
> > a .bss section with zeros? Would it make sense to use .align instead?
>
> Filling with zeroes is allowed, and that's what we are intending anyway.
> .align would not do the right thing here as it only adds padding if it's
> not already aligned, but we know it is.
--
Josh
next prev parent reply other threads:[~2016-11-17 22:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-16 14:17 Arnd Bergmann
2016-11-17 7:19 ` [tip:x86/urgent] x86/boot: Avoid " tip-bot for Arnd Bergmann
2016-11-17 21:02 ` [PATCH] x86: avoid " Josh Poimboeuf
2016-11-17 21:19 ` hpa
2016-11-17 22:32 ` Arnd Bergmann
2016-11-17 22:44 ` Josh Poimboeuf [this message]
2016-11-18 0:07 ` H. Peter Anvin
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=20161117224445.n3nerymee5jnrq75@treble \
--to=jpoimboe@redhat.com \
--cc=arnd@arndb.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.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
all inboxes | Powered by JetHome®