A single-pass x86_64 assembler that emits relocatable ELF64 objects
.gitignore | ||
compile.go | ||
elf.go | ||
go.mod | ||
lexer.go | ||
main_test.go | ||
main.go | ||
README.md | ||
test_assemble.sh | ||
token.go |
pxasme
A single-pass x86_64 assembler that emits relocatable ELF64 objects.
Usage
pxasme -Src myapp.asm -Dest myapp.o
ld -s -o myapp myapp.o
./myapp
Status
- Lexer
- "Variables" in data/rodata (u8, u16, u32, u64, sz)
- C-style addressing (bare or
&
)
- C-style addressing (bare or
- Unified public/private, import/export syntax
- State machine parser for opcode arguments
- "Variables" in data/rodata (u8, u16, u32, u64, sz)
- Parser
- mov, ret, syscall, sections, variables
- strlen($var) compile-time function
- more isa ops
- Code generation
- Generate ELF64 binaries
- Relocations
R_X86_64_32S
(n.b. not PIC)R_X86_64_64
- Relocations
- Freestanding mode
- Generate ELF64 binaries