github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/cmd/link/testdata/layout.s (about)

     1  // Copyright 2014 The Go Authors.  All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  // Test of section assignment in layout.go.
     6  // Each symbol should end up in the section named by the symbol name prefix (up to the underscore).
     7  
     8  #include "textflag.h"
     9  
    10  TEXT text_start(SB),7,$0
    11  	MOVQ $rodata_sym(SB), AX
    12  	MOVQ $noptrdata_sym(SB), AX
    13  	MOVQ $data_sym(SB), AX
    14  	MOVQ $bss_sym(SB), AX
    15  	MOVQ $noptrbss_sym(SB), AX
    16  	RET
    17  
    18  DATA rodata_sym(SB)/4, $1
    19  GLOBL rodata_sym(SB), RODATA, $4
    20  
    21  DATA noptrdata_sym(SB)/4, $1
    22  GLOBL noptrdata_sym(SB), NOPTR, $4
    23  
    24  DATA data_sym(SB)/4, $1
    25  GLOBL data_sym(SB), $4
    26  
    27  GLOBL bss_sym(SB), $4
    28  
    29  GLOBL noptrbss_sym(SB), NOPTR, $4