Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752634AbcKQWe2 (ORCPT ); Thu, 17 Nov 2016 17:34:28 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:53301 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751652AbcKQWe0 (ORCPT ); Thu, 17 Nov 2016 17:34:26 -0500 From: Arnd Bergmann To: Josh Poimboeuf Cc: x86@kernel.org, Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andy Lutomirski , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: avoid warning for zero-filling .bss Date: Thu, 17 Nov 2016 23:32:30 +0100 Message-ID: <12902246.avh8vXRAfV@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161117210248.u3velicjxwwbwql5@treble> References: <20161116141726.2013389-1-arnd@arndb.de> <20161117210248.u3velicjxwwbwql5@treble> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:jw8vQiKgdYTHP1eVV2wI2MTrOKdqSx7rf8/wHU0T7lBqdUdGw8D zLVjw+vtPlGZ7O94A03XEBeIqUyUGwBUKEqxO0s/rJeCArPnMnnwUdKtioCRt3ezs4/Ao8F Ba6PTfAk+OELAPyYr/EciNEA79C1eC0C9H1+ruzMNNE5zHghhFNSYIAPy5ixaCLmDltrEhS CkqDi41v+50XNhnsvx6ag== X-UI-Out-Filterresults: notjunk:1;V01:K0:4RgZ88yjf8w=:GOkR2b9oy7ctCZD+LqTZue NsA8snk9aCvFIgJQOaEvYE8zTEJh1hxpoOxd8rb6rHlPoDaPSs5n2hYT9SII6KfkV+9prhjCD 3ynzxf50ET9wAyRGCDCajfcMzuzP9SUYs0f/MIb1QW0pU8ROLjaJlc2S+vD9xj/QMyRdTWL0u 3ZEslM7Sae2S5qRPpEk0b/sLuCTPyFgl0jy/rmJjTlJpbB9s/345fV86/8FW0p/kpXrWNB7Ic qv2YhaYxkGUwkUQPb976EMTyTLztPNUhdwyvF6UwdD4h1A6ndFXzCJm1q38jRcpHUqTWzRrvy GyEOl806I58VYdu1uzP33ZAqfnHP13GbDFz3PTPzqORiZUxn9sR8mu7quHmP38sP3tMHK+uWF 5YRoq34dHYpyVtFzu3A8Rk56aDstxUw0RaD2pj13ffqg+18iKeKi6YdPIGex4k0R7KCWtTg1F UszndwQlVN4skx4UNnxyoPzCyymW1F794qk8D07hLNQ5cevOoB3C+OhiAy0GeOfEMA/gUE9H6 HVi1VoYWuHi3RYsgUkfBqLcc/aRKS6U+a5VIBmJi/OuHvrlfGZQ4xPaCmwaofOjpxfHXg0PQp 5ZG3UTblHhDIHrpUuBHidaifsfL7U3X5TGDDGHDB021SHBnlB2+SAi3/EZk/RbvmvRG0qVitC 52TOnmJN7DDKOO1spK1Pp0440xQoDieGBo0XUzv4g7Xrzk4WcjJNcuk/2YpxoWW1ur9Jbrq9t IIFW5iYH5JvdVrgM Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1208 Lines: 26 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. > 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. Arnd