@neauoire What's the format of those files?
5 comments
@neauoire OK, I see. So that information should be enough to link a label to an address. What would be needed for linking would be to add a fixed offset to all absolute addresses in a rom. @neauoire Sorry, I didn't provide enough context. Suppose you have an tal program and you call a function that is not defined in the source code, but you have a .rom and .rom.sym for it. From the .rom.sym you can get the address for the label, but that will in general not work because you need to combine the roms for both. So you'd need to apply some offset to the rom so that its content fits after the content of your source file. For that you'd need to know at which address your source ends. @wim_v12e Oh! yes, the format is pretty limited. It won't be able to do this sort of gymnastics yet. |
@wim_v12e specs: https://wiki.xxiivv.com/site/symbols.html you can seen an implementation of the symbols finding routine here: https://git.sr.ht/~rabbits/beetbug/tree/main/item/src/beetbug.tal#L683