From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263803AbTLORK3 (ORCPT ); Mon, 15 Dec 2003 12:10:29 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263805AbTLORK2 (ORCPT ); Mon, 15 Dec 2003 12:10:28 -0500 Received: from louise.pinerecords.com ([213.168.176.16]:12456 "EHLO louise.pinerecords.com") by vger.kernel.org with ESMTP id S263803AbTLORKX (ORCPT ); Mon, 15 Dec 2003 12:10:23 -0500 Date: Mon, 15 Dec 2003 18:08:43 +0100 From: Tomas Szepe To: "Richard B. Johnson" Cc: Vladimir Kondratiev , "Kevin P. Fleming" , Mark Hahn , Linux Kernel Mailing List , Martin Mares Subject: Re: PCI Express support for 2.4 kernel Message-ID: <20031215170843.GA10857@louise.pinerecords.com> References: <3FDDD8C6.3080804@intel.com> <3FDDDC68.80209@backtobasicsmgmt.com> <3FDDE39E.1050300@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Dec-15 2003, Mon, 11:55 -0500 Richard B. Johnson wrote: > Easy way to remember is that if you have either a static or a global > variable that is initialized, it will be in the .data segment and, > therefore take up space in the executable. If it is not initialized, > it will be in the .bss segment, automatically zeroed by the loader. > In this case, the executable contains length information, not the data. > Local variables are never initialized unless there's an '=' in the > code. I think you guys are all missing Vladimir's point, which is that gcc is able to detect that an explicit initialization of a static variable happens to be to the value of ZERO, and place the variable in .bss _in spite of the initialization_. -- Tomas Szepe