sasq64 / bass

Advanced 6502 assembler
23 stars 4 forks source link

Section relocation #40

Open antis81 opened 1 year ago

antis81 commented 1 year ago

Locating a section based on a label (example in section_move test) creates quite complex dependency issues when defined after being accessed (-> below a section).

Here is a simplified version of the test visualizing the problem:

!section "circular", circular_label

   ; meanwhile some code lines later… :)

circular_label:

    ; whoops…

To support this the ownership of a label (symbol actually) has to be defined. The above situation creates a circular dependency. Currently bass is unable to detect such programming error (that's basically what it is… :slightly_smiling_face:).