Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 11 Jan 2002 10:40:47 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 11 Jan 2002 10:40:38 -0500 Received: from caramon.arm.linux.org.uk ([212.18.232.186]:25609 "EHLO caramon.arm.linux.org.uk") by vger.kernel.org with ESMTP id ; Fri, 11 Jan 2002 10:40:27 -0500 Date: Fri, 11 Jan 2002 15:40:16 +0000 From: Russell King To: Thomas Hood Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] Combined APM patch Message-ID: <20020111154016.D31366@flint.arm.linux.org.uk> In-Reply-To: <1010762545.788.2.camel@thanatos> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <1010762545.788.2.camel@thanatos>; from jdthood@mail.com on Fri, Jan 11, 2002 at 10:22:24AM -0500 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 11, 2002 at 10:22:24AM -0500, Thomas Hood wrote: > This is useful information, > because if someone later wants to modify the code to make > this variable non-static, the comment tells that person that > the variable will need an initializer. Whether a variable is static or not doesn't change whether it ends up in the bss segment or not. /* top level */ static int foo; int bar; Both foo and bar will be initialised to 0 - since they're both placed into the BSS segment (or maybe its common subsection): $ gcc -S -o - t.c @ Generated by gcc 2.96 20000731 (Red Hat Linux 7.1 2.96-80) for ARM/elf .file "t.c" gcc2_compiled.: .bss .align 2 foo: .space 4 .comm bar, 4 @ 4 $ gcc -S -o - t.c -fno-common @ Generated by gcc 2.96 20000731 (Red Hat Linux 7.1 2.96-80) for ARM/elf .file "t.c" gcc2_compiled.: .bss .align 2 foo: .space 4 .global bar .align 2 .type bar,object .size bar,4 bar: .space 4 -- Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/