diff options
Diffstat (limited to 'lib/imm.ld')
| -rw-r--r-- | lib/imm.ld | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/imm.ld b/lib/imm.ld new file mode 100644 index 0000000..5e69ebf --- /dev/null +++ b/lib/imm.ld @@ -0,0 +1,23 @@ +ENTRY(_op) + +PHDRS { + headers PT_PHDR PHDRS; + text PT_LOAD FILEHDR PHDRS; + data PT_LOAD; +} + +SECTIONS { + . = SIZEOF_HEADERS; + .text : { + *(.text*); + + /* reserve eight bytes of data */ + __imm = .; + . += 8; + __next_op = .; + } :text + + /* mostly just to silence warnings, operations aren't allowed to have + * any data in them */ + .data : { *(.data*) } :data +} |
