This is the mail archive of the
mailing list for the binutils project.
How to expand the `bss`section and fill it zeros when 'objcopy'ing?
- From: "PRC" <panruochen at gmail dot com>
- To: binutils <binutils at sourceware dot org>
- Date: Mon, 12 Nov 2007 15:39:53 +0800
- Subject: How to expand the `bss`section and fill it zeros when 'objcopy'ing?
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?