The following statements are equivalent.
dq 0x4024000000000000
dq 10.0
See the manual for details.
문제
So basically I have some asm code disassembled from a ELF binary, on 32 bit Linux.
In the .rodata section, I can find a sequence of 8 byte like this:
00000000 00002440
I know it represent a double number (which is 10.0), and I am trying to re-use it in my nasm code like this:
a dq 00000000 00002440 ; how to adjust it?
fld qword [a]
fstp QWORD [esp+0x18]
fld QWORD [esp+0x18]
fstp QWORD [esp+0x4]
mov DWORD [esp],b
call printf
Obviously a dq 00000000 00002440 is not correct, and I have tried for several ways, but still can not assemble it using follow command (or some times I can assemble, but just get a wrong result as 0.00)
nasm -f elf test.s
Could anyone give me some help?
해결책