Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752084AbcKQVTr (ORCPT ); Thu, 17 Nov 2016 16:19:47 -0500 Received: from terminus.zytor.com ([198.137.202.10]:35082 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750855AbcKQVTq (ORCPT ); Thu, 17 Nov 2016 16:19:46 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <20161117210248.u3velicjxwwbwql5@treble> References: <20161116141726.2013389-1-arnd@arndb.de> <20161117210248.u3velicjxwwbwql5@treble> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Subject: Re: [PATCH] x86: avoid warning for zero-filling .bss From: hpa@zytor.com Date: Thu, 17 Nov 2016 13:19:22 -0800 To: Josh Poimboeuf , Arnd Bergmann CC: x86@kernel.org, Thomas Gleixner , Ingo Molnar , Andy Lutomirski , linux-kernel@vger.kernel.org Message-ID: <83FAA1B6-6AE7-4BB6-856A-0ABEE83EC782@zytor.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1789 Lines: 58 On November 17, 2016 1:02:48 PM PST, 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? > >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? > >> --- >> arch/x86/kernel/head_32.S | 9 ++++++--- >> 1 file changed, 6 insertions(+), 3 deletions(-) >> >> diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S >> index df541ac2071e..4e8577d03372 100644 >> --- a/arch/x86/kernel/head_32.S >> +++ b/arch/x86/kernel/head_32.S >> @@ -669,14 +669,17 @@ __PAGE_ALIGNED_BSS >> initial_pg_pmd: >> .fill 1024*KPMDS,4,0 >> #else >> -ENTRY(initial_page_table) >> +.globl initial_page_table >> +initial_page_table: >> .fill 1024,4,0 >> #endif >> initial_pg_fixmap: >> .fill 1024,4,0 >> -ENTRY(empty_zero_page) >> +.globl empty_zero_page >> +empty_zero_page: >> .fill 4096,1,0 >> -ENTRY(swapper_pg_dir) >> +.globl swapper_pg_dir >> +swapper_pg_dir: >> .fill 1024,4,0 >> EXPORT_SYMBOL(empty_zero_page) >> >> -- >> 2.9.0 >> Use .org, .align, or .space -- Sent from my Android device with K-9 Mail. Please excuse my brevity.