flat assembler
Message board for the users of flat assembler.
Index
> Windows > About creating a DLL Goto page Previous 1, 2 |
Author |
|
hopcode 10 Jul 2012, 10:44
LocoDelAssembly wrote: ...the code block of this post. because on conditional compilation some references to exp/imp functions may be skipped. one safer workaround could be using something always known as here: Code: DllEntryPoint: mov eax,DllEntryPoint mov eax,1 ret Cheers _________________ ⠓⠕⠏⠉⠕⠙⠑ |
|||
10 Jul 2012, 10:44 |
|
LocoDelAssembly 10 Jul 2012, 15:57
hopcode, although your last code works in 32-bit code, on 64-bit code "mov eax,DllEntryPoint" would use RIP-relative encoding so as a general solution using the complicated reloc section or "dd/dq ExitProcess" (or an internal label if you only want to force relocation) is safer.
|
|||
10 Jul 2012, 15:57 |
|
hopcode 10 Jul 2012, 17:00
LocoDelAssembly wrote: on 64-bit code "mov eax,DllEntryPoint" would use RIP-relative encoding it works perfectly, and not RIP Code: L_00401000:mov rax, 0x401000 L_0040100A:mov eax, 0x1 L_0040100F:ret _________________ ⠓⠕⠏⠉⠕⠙⠑ |
|||
10 Jul 2012, 17:00 |
|
LocoDelAssembly 10 Jul 2012, 23:12
Ups, sorry, I made a terrible mistake! There is no RIP-relative encoding here (as it would happen with LEA), not even if using EAX.
|
|||
10 Jul 2012, 23:12 |
|
questlima 27 Aug 2014, 13:23
This is nice now i know how to write a DLL in FASM:D thanks
|
|||
27 Aug 2014, 13:23 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.