feat(asm): the operand forms and defines GOROOT writes

Assisted-by: GLM 5.3 Flash
This commit is contained in:
2026-09-21 21:17:34 +02:00
parent 5382c9a8e4
commit 8cfd40aac8
9 changed files with 277 additions and 22 deletions
+7
View File
@@ -166,6 +166,13 @@ func AssembleFile(f *ast.File) (*Image, error) {
for _, d := range dataSyms {
known[d.name] = true
}
// TEXT symbols are file-level definitions too: a symbol immediate
// ($fn(SB)) may name one, exactly as a data reference names a GLOBL.
for _, d := range f.Decls {
if t, ok := d.(*ast.Text); ok {
known[t.Name.Name] = true
}
}
link := &linkInfo{symbols: known, allowExternal: true}
poolSeen := map[string]bool{}