Open Issues Need Help
View All on GitHubAI Summary: Implement a minimal assembler in Python to convert x86 assembly code (`.s` files) generated by a C compiler into ELF object files (`.o` files). The assembler should handle basic x86 instructions, labels, jumps, `.text` and `.data` sections, and a symbol table. It should output a valid 64-bit ELF `.o` file that can be linked (either with the custom linker or `ld`). Optional future work includes supporting relocation entries, `.bss` and `.rodata` sections, and a more complete instruction set.
A Python-based C compiler for x86-64, featuring full parsing, semantic analysis, IR generation, and assembly code emission.
AI Summary: The task is to create a minimal ELF linker for 32-bit x86 architecture in order to make the existing Python-based C compiler independent of external linkers like GCC/LD. This initial version should handle ELF header creation, program header generation, merging of code sections (.text, .data, .bss), basic symbol resolution, and writing the output to an a.out file. Relocations, dynamic linking, and debugging information are out of scope for this initial implementation.
A Python-based C compiler for x86-64, featuring full parsing, semantic analysis, IR generation, and assembly code emission.
AI Summary: Implement a minimal C preprocessor for the existing x86-64 C compiler, handling #include, #define, #ifdef/#ifndef/#endif directives, and comment removal. The preprocessor should be independent of GCC, focusing on basic macro replacement and header inclusion without advanced features like variadic macros or macro functions.
A Python-based C compiler for x86-64, featuring full parsing, semantic analysis, IR generation, and assembly code emission.