From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27120 invoked by alias); 11 Dec 2007 12:59:04 -0000 Received: (qmail 27112 invoked by uid 22791); 11 Dec 2007 12:59:04 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 11 Dec 2007 12:58:58 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id EB91398020; Tue, 11 Dec 2007 12:58:56 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id 7A5D19801F; Tue, 11 Dec 2007 12:58:56 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.68) (envelope-from ) id 1J24hL-0006Xq-LC; Tue, 11 Dec 2007 07:58:55 -0500 Date: Tue, 11 Dec 2007 12:59:00 -0000 From: Daniel Jacobowitz To: PRC Cc: pkoning , binutils Subject: Re: Re: How to inform the linker not to produce any data for a .bsssection? Message-ID: <20071211125855.GA25143@caradoc.them.org> Mail-Followup-To: PRC , pkoning , binutils References: <20071209200658.GA26653@caradoc.them.org> <200712110919091773244@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200712110919091773244@gmail.com> User-Agent: Mutt/1.5.15 (2007-04-09) X-IsSubscribed: yes Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org X-SW-Source: 2007-12/txt/msg00062.txt.bz2 On Tue, Dec 11, 2007 at 09:19:12AM +0800, PRC wrote: > mips-elf-objdump -h a.out > ------------------------------------------------------------------- > 3 .bss 00010620 81413898 81413898 00003898 2**3 > ALLOC > 4 .reginfo 00000018 00000000 00000000 00013eb8 2**2 > CONTENTS, READONLY, LINK_ONCE_SAME_SIZE > ------------------------------------------------------------------ > The difference between sections ".bss" and ".reginfo" is almost 64K, > which is just the size of the buffer `cmd_buffer`. And I check the > output file, and find there are lots of zero starting from the offset > 0x3898. It seems the linker puts 64K zeros in the section ".bss". This is necessary alignment. If you don't want .bss to take up space in the file, do not put allocated sections after it. -- Daniel Jacobowitz CodeSourcery