Skip to content

Implement HiSEP-Q "Loader" #69

@rainij

Description

@rainij

Within our LLVM fork implement a loader which takes the ELF produced by our compiler and generates the memory file for the opcode simulator (c.f. #67). The memory file will look like this:

06600313
05500393
00400293
0C62F057
...
@00000400
06040200
00000000
...

The convention is that the top of the file corresponds to offset zero and contains the text section (PC starts at zero). In the above example at 0x400 the segment with the data section begins, but this is not fixed, it could be elsewhere.

In order to respect the convention above the linker has to be set up correctly. This probably amounts to devising an appropriate linker script. Once this is done the "loader" does not have to be smart or assume anything, it just grabs the info from the ELF. It is just that the ELF should specify that the text section should go to the very first memory segment.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions