summaryrefslogtreecommitdiff
path: root/TODO
blob: b358871ee836d26854beb1657ce3129e3328457b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Intermediate code generation

- 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

- Don't ignore relocations where the symbol is not defined in the symbol table.
  Report an error about an undefined symbol.
- 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.
- The final reutrn value of the state monad should be the Elf header.