OK, so basically I want to re-use the content from dumped
bss section from ELF on Linux 32bit.
The dump command:
objdump -s -j .text elf_binary objdump -s -j .rodata elf_binary objdump -s -j .data elf_binary
and for the
.bss section, I am preparing to re-use a bunch of
00000000 which has the same size of the
It works fine when I re-use it in
nasm assembler in this way.
.section rodata S_label1: db 0x01 db 0x02 .... .section data db 0x01 S_label2: db 0x02 .... .section bss S_label3: db 0x00 db 0x00 .... nasm -f elf test.s
But basically my question is that:
how to re-use these dumped sections in
gas has a different assemble style, and apparently the data sections representations are different...
I tried for several times and I still can not find the solution..
Did I clearly demonstrate my question..? Could anyone give me some help?
So basically I want to re-use the
bss sections dumped from another binary.
For example, here is the content of
03000000 01000200 0a0a556e 736f7274 65642061 72726179 2069733a 20200020 25642000 0a0a536f 72746564 20617272 61792069 733a2020 00
and I can re-use it in this way:
label1: db 0x03 db 0x00 db 0x00 db 0x00 label2: db 0x01 db 0x00 db 0x02 db 0x00 ..... mov eax, label1 // of course I will guarantee that I use it correctly ....
nasm, I can easily re-use them in the above way, but my question is that , how can I re-use it in
gas (or directly use
gcc) in a similiar way?
Is it possible?