Create empty relocations section

This commit is contained in:
2024-09-08 22:53:07 +02:00
parent 1cbbef19af
commit 26627cc49f
3 changed files with 148 additions and 55 deletions

13
TODO
View File

@ -3,3 +3,16 @@
- Put symbol table in the reader monad and it to the stack
or use the state monad for everything.
- Add errors handling to the monad stack.
# ELF generation
- Define SHF_ constants.
- Don't ignore relocations where the symbol is not defined in the symbol table.
Add it as an external symbol to the symbol table.
- Since every function adds a section header use a state monad
in the generator and put the headers into the state to reduce the number of
returned values in the tuples.
- Relocation section header relates to another section (e.g. .rel.text). The
index of that section should be passed together with collected relocations.
- symstrtab creates 3 section headers and does some math to calculate the
offsets and names. Introducing the state monad can help to get rid of magic
numbers.