Mark disassembled object section with label

This commit is contained in:
Yoshi Askharoun
2024-01-31 19:44:23 -06:00
parent 45475c5934
commit 7d3bce3e2b
+4
View File
@@ -54,6 +54,10 @@ public class Disassembler
{ {
var reader = _loadResult.ObjectSection; var reader = _loadResult.ObjectSection;
// Insert a label to mark the start of the object section.
// In the future, this might use a special directive like `.section object`
yield return new Label("code");
while (reader.CurrentOffset < reader.Size) while (reader.CurrentOffset < reader.Size)
{ {
var opCode = (OpCode)reader.ReadByte(); var opCode = (OpCode)reader.ReadByte();