w6a: DATAW directive for writable .data section
First step toward top-level mutable `let`. Adds a sibling directive to DATA whose bytes land in a separate writable .data PROGBITS section (SHF_ALLOC|SHF_WRITE, STT_OBJECT) instead of .text. The section is emitted only when DATAW was used, so inputs without it produce a byte-identical .o — tests 991 (selfhost .o diff) and 995 (self-rebuild) keep passing unchanged. w6l still treats data-resident syms as undefined; that's the next step.
This commit is contained in:
@@ -40,6 +40,7 @@ enum {
|
||||
A_NOP = 0,
|
||||
A_TEXT,
|
||||
A_DATA,
|
||||
A_DATAW, /* writable DATA: lands in .data (RW) instead of .text */
|
||||
A_GLOBL,
|
||||
A_END,
|
||||
|
||||
|
||||
Reference in New Issue
Block a user