diff options
| author | onelin <oscar@nelin.dk> | 2026-06-10 16:31:09 +0000 |
|---|---|---|
| committer | onelin <oscar@nelin.dk> | 2026-06-10 16:31:09 +0000 |
| commit | bdab60d74d14eeea7a5e35a983e5e319686ae192 (patch) | |
| tree | 358deef22e22c41668e4ecff0c08784323ae35d6 /main.c | |
| parent | 7cc1a2e6ccc8f4a87e73c35672e7bb973e965470 (diff) | |
Add shstrtab
Diffstat (limited to 'main.c')
| -rw-r--r-- | main.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,8 +1,16 @@ +#include "instructions.h" +#include "registers.h" #include "write_elf.c" +static const unsigned char some_opcodes[] = {MOVDI(REG_EAX, 0x3c), + MOVDI(REG_EDI, 0x41), SYSCALL}; + +static const unsigned int some_opcodes_len = + sizeof(some_opcodes) / sizeof(some_opcodes[0]); + int main(int argc, char* argv[]) { char opcodes[] = {}; - write_elf("test.out", some_opcodes_len, some_opcodes); + write_elf("test.out", some_opcodes_len, (char*)some_opcodes); return 0; } |
