func (p *Parser) symDefRef(w io.Writer, word string, operands [][]lex.Token) {
	switch word {
	case "TEXT":
		// Defines text symbol in operands[0].
		if len(operands) > 0 {
			p.start(operands[0])
			if name, abi, ok := p.funcAddress(); ok {
				fmt.Fprintf(w, "def %s %s\n", name, abi)
			}
		}
		return
	case "GLOBL", "PCDATA":
		// No text definitions or symbol references.
	case "DATA", "FUNCDATA":
		// For DATA, operands[0] is defined symbol.
		// For FUNCDATA, operands[0] is an immediate constant.
		// Remaining operands may have references.
		if len(operands) < 2 {
			return
		}
		operands = operands[1:]
	}
	// Search for symbol references.
	for _, op := range operands {
		p.start(op)
		if name, abi, ok := p.funcAddress(); ok {
			fmt.Fprintf(w, "ref %s %s\n", name, abi)
		}
	}
}
// symDefRef scans a line for potential text symbol definitions and
// references and writes symabis information to w.
//
// The symabis format is documented at
// cmd/compile/internal/ssagen.ReadSymABIs.
symDefRef scans a line for potential text symbol definitions and
references and writes symabis information to w.

The symabis format is documented at
cmd/compile/internal/ssagen.ReadSymABIs.
// symDefRef scans a line for potential text symbol definitions and // references and writes symabis information to w . // // The symabis format is documented at // cmd / compile / internal / ssagen . ReadSymABIs .
func (p *Parser) symDefRef(w io.Writer, word string, operands [][]lex.Token) {
	switch word {
	case "TEXT":
		if len(operands) > 0 {
			p.start(operands[0])
			if name, abi, ok := p.funcAddress(); ok {
				fmt.Fprintf(w, "def %s %s\n", name, abi)
			}
		}
		return
	case "GLOBL", "PCDATA":
	case "DATA", "FUNCDATA":
		if len(operands) < 2 {
			return
		}
		operands = operands[1:]
	}
	for _, op := range operands {
		p.start(op)
		if name, abi, ok := p.funcAddress(); ok {
			fmt.Fprintf(w, "ref %s %s\n", name, abi)
		}
	}
}
func ( p * Parser ) symDefRef ( w io . Writer , word string , operands [ ] [ ] lex . Token ) { switch word { case " " : if len ( operands ) > 0 { p . start ( operands [ 0 ] ) if name , abi , ok := p . funcAddress ( ) ; ok { fmt . Fprintf ( w , " \n " , name , abi ) } } return case " " , " " : case " " , " " : if len ( operands ) < 2 { return } operands = operands [ 1 : ] } for _ , op := range operands { p . start ( op ) if name , abi , ok := p . funcAddress ( ) ; ok { fmt . Fprintf ( w , " \n " , name , abi ) } } }
symDefRef scans a line for potential text symbol definitions and
references and writes symabis information to w.
symDefRef scans a line for potential text symbol definitions and references and writes symabis information to w .
// Defines text symbol in operands[0]. // No text definitions or symbol references. // For DATA, operands[0] is defined symbol. // For FUNCDATA, operands[0] is an immediate constant. // Remaining operands may have references. // Search for symbol references.