This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]