You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code can be compiled only for Windows x86_64! On Linux, compilation failed with PIC error.
Base image address - 0x140000000
This code after compilation use invalid address of xversion - it reduces address to 4byte, but not use RIP-relative access. Instead of mov RAX, [0x1400a1000] generated mov RAX, [0x400a1000]. Some bug with lea
Note that this only applies to naked DMD-style inline asm. This can also be expressed in non-naked DMD asm, but still making the function naked (and so I guess analogous to your clang example):
Code:
This code can be compiled only for Windows x86_64! On Linux, compilation failed with PIC error.
Base image address - 0x140000000
This code after compilation use invalid address of
xversion
- it reduces address to 4byte, but not use RIP-relative access. Instead ofmov RAX, [0x1400a1000]
generatedmov RAX, [0x400a1000]
. Some bug withlea
Code on C++ work fine:
Compiled with
clang++ -fms-extensions
. Flag-fms-extensions
used to writeasm
with intal syntax, like on D.Clang version - 13.0.1
ldc2 version - 1.28.1 (based on DMD v2.098.1 and LLVM 13.0.1)
P.S.
dmd
can't compile this code on x86_64.P.P.S. rizin can compile this instruction properly -
0x00000000 10 48a100100a4001000000 movabs rax, qword [0x1400a1000]
The text was updated successfully, but these errors were encountered: