github.com/razvanm/vanadium-go-1.3@v0.0.0-20160721203343-4a65068e5915/src/cmd/link/testdata/autosection.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-named symbols.
     6  
     7  #include "textflag.h"
     8  
     9  TEXT start(SB),7,$0
    10  	MOVQ $autotab(SB),AX
    11  	MOVQ $autoptr(SB),AX
    12  	RET
    13  
    14  GLOBL zero(SB), $8
    15  
    16  GLOBL zeronoptr(SB), NOPTR, $16
    17  
    18  // text
    19  DATA autotab+0x00(SB)/8, $runtime·text(SB)
    20  DATA autotab+0x08(SB)/8, $start(SB)
    21  DATA autotab+0x10(SB)/8, $runtime·etext(SB)
    22  DATA autotab+0x18(SB)/8, $start+16(SB)
    23  
    24  // data
    25  DATA autotab+0x20(SB)/8, $runtime·data(SB)
    26  DATA autotab+0x28(SB)/8, $autotab(SB)
    27  DATA autotab+0x30(SB)/8, $runtime·edata(SB)
    28  DATA autotab+0x38(SB)/8, $nonzero+4(SB)
    29  
    30  // bss
    31  DATA autotab+0x40(SB)/8, $runtime·bss(SB)
    32  DATA autotab+0x48(SB)/8, $zero(SB)
    33  DATA autotab+0x50(SB)/8, $runtime·ebss(SB)
    34  DATA autotab+0x58(SB)/8, $zero+8(SB)
    35  
    36  // noptrdata
    37  DATA autotab+0x60(SB)/8, $runtime·noptrdata(SB)
    38  DATA autotab+0x68(SB)/8, $nonzeronoptr(SB)
    39  DATA autotab+0x70(SB)/8, $runtime·enoptrdata(SB)
    40  DATA autotab+0x78(SB)/8, $nonzeronoptr+8(SB)
    41  
    42  // noptrbss
    43  DATA autotab+0x80(SB)/8, $runtime·noptrbss(SB)
    44  DATA autotab+0x88(SB)/8, $zeronoptr(SB)
    45  DATA autotab+0x90(SB)/8, $runtime·enoptrbss(SB)
    46  DATA autotab+0x98(SB)/8, $zeronoptr+16(SB)
    47  
    48  // end
    49  DATA autotab+0xa0(SB)/8, $runtime·end(SB)
    50  DATA autotab+0xa8(SB)/8, $zeronoptr+16(SB)
    51  
    52  GLOBL autotab(SB), $0xb0
    53  
    54  DATA nonzero(SB)/4, $1
    55  GLOBL nonzero(SB), $4
    56  
    57  DATA nonzeronoptr(SB)/8, $2
    58  GLOBL nonzeronoptr(SB), NOPTR, $8
    59  
    60  GLOBL autoptr(SB), $0