ast,build: allow setting data attributes

Previously GLOBL/DATA attributes are set to RODATA. This diff removes
that default and allows them to be set through the DataAttributes
context method.

Updates #2
This commit is contained in:
Michael McLoughlin
2018-12-31 19:04:14 -08:00
parent f2315d539c
commit 816fa4c0e6
8 changed files with 19 additions and 11 deletions

View File

@@ -44,7 +44,7 @@ TEXT ·CriticalLine(SB), $0-24
RET
DATA half<>(SB)/8, $(0.5)
GLOBL half<>(SB), RODATA, $8
GLOBL half<>(SB), RODATA|NOPTR, $8
// func NewStruct(w uint16, p [2]float64, q uint64) Struct
TEXT ·NewStruct(SB), $0-64