flat assembler
Message board for the users of flat assembler.
Index
> Windows > How load and run ELF code in PE program ? |
Author |
|
ProMiNick 13 Aug 2019, 13:45
In theory it is easy reading elf headers - according to them allocates pages with apropriate (read, write, execute) permissions. copy content of file to that pages. then reading elf relocs and aply them. then must be resolved imports to their windows analogs. All sounds simple only in theory.
On practice thou have to know elf format deep detail. thou have to know what api equvalents in both OS, and how from one parameters set wrap to another. thou have to know how to allocate memory with permissions. And moreover all of work would be unusefull if in used part of elf code would be even one syscall. Contrvers task - using PE in ELF looks more simpler due to (PE - is most documented executable format in world),(PE commonly never uses syscalls). |
|||
13 Aug 2019, 13:45 |
|
Feryno 13 Aug 2019, 15:49
If your windows supports WSL (Windows Subsystem for Linux), you can run linux binaries natively. There is already WSL 2 in latest windows insiders.
|
|||
13 Aug 2019, 15:49 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.