From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8338 invoked by alias); 12 Nov 2007 07:40:25 -0000 Received: (qmail 8330 invoked by uid 22791); 12 Nov 2007 07:40:24 -0000 X-Spam-Check-By: sourceware.org Received: from wa-out-1112.google.com (HELO wa-out-1112.google.com) (209.85.146.181) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 12 Nov 2007 07:40:22 +0000 Received: by wa-out-1112.google.com with SMTP id l35so1614714waf for ; Sun, 11 Nov 2007 23:40:20 -0800 (PST) Received: by 10.114.94.1 with SMTP id r1mr636143wab.1194853220305; Sun, 11 Nov 2007 23:40:20 -0800 (PST) Received: from ghost ( [221.222.166.104]) by mx.google.com with ESMTPS id k39sm7721859wah.2007.11.11.23.40.16 (version=SSLv3 cipher=OTHER); Sun, 11 Nov 2007 23:40:19 -0800 (PST) Date: Mon, 12 Nov 2007 07:40:00 -0000 From: "PRC" To: binutils Subject: How to expand the `bss`section and fill it zeros when 'objcopy'ing? Message-ID: <200711121539456225128@gmail.com> X-mailer: Foxmail 6, 9, 201, 16 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit 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-11/txt/msg00107.txt.bz2 I want to create a raw binary file from a ELF image. I invoke the command: mips-elf-objcopy -O binary -j ".text" -j ".data" -j ".bss" my.exe my.bin But the size of the output `my.bin` is not the sum of sizes of ".text", ".data" and ".bss". It is the sum of ".text" and ".data", excluding ".bss". How can I make objcopy expand the ".bss" section and fill it zeros?