github.com/shogo82148/std@v1.22.1-0.20240327122250-4e474527810c/cmd/link/internal/ld/target.go (about)

     1  // Copyright 2020 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  package ld
     6  
     7  import (
     8  	"github.com/shogo82148/std/cmd/internal/objabi"
     9  	"github.com/shogo82148/std/cmd/internal/sys"
    10  )
    11  
    12  // Target holds the configuration we're building for.
    13  type Target struct {
    14  	Arch *sys.Arch
    15  
    16  	HeadType objabi.HeadType
    17  
    18  	LinkMode  LinkMode
    19  	BuildMode BuildMode
    20  
    21  	linkShared    bool
    22  	canUsePlugins bool
    23  	IsELF         bool
    24  }
    25  
    26  func (t *Target) IsExe() bool
    27  
    28  func (t *Target) IsShared() bool
    29  
    30  func (t *Target) IsPlugin() bool
    31  
    32  func (t *Target) IsInternal() bool
    33  
    34  func (t *Target) IsExternal() bool
    35  
    36  func (t *Target) IsPIE() bool
    37  
    38  func (t *Target) IsSharedGoLink() bool
    39  
    40  func (t *Target) CanUsePlugins() bool
    41  
    42  func (t *Target) IsElf() bool
    43  
    44  func (t *Target) IsDynlinkingGo() bool
    45  
    46  // UseRelro reports whether to make use of "read only relocations" aka
    47  // relro.
    48  func (t *Target) UseRelro() bool
    49  
    50  func (t *Target) Is386() bool
    51  
    52  func (t *Target) IsARM() bool
    53  
    54  func (t *Target) IsARM64() bool
    55  
    56  func (t *Target) IsAMD64() bool
    57  
    58  func (t *Target) IsMIPS() bool
    59  
    60  func (t *Target) IsMIPS64() bool
    61  
    62  func (t *Target) IsLOONG64() bool
    63  
    64  func (t *Target) IsPPC64() bool
    65  
    66  func (t *Target) IsRISCV64() bool
    67  
    68  func (t *Target) IsS390X() bool
    69  
    70  func (t *Target) IsWasm() bool
    71  
    72  func (t *Target) IsLinux() bool
    73  
    74  func (t *Target) IsDarwin() bool
    75  
    76  func (t *Target) IsWindows() bool
    77  
    78  func (t *Target) IsPlan9() bool
    79  
    80  func (t *Target) IsAIX() bool
    81  
    82  func (t *Target) IsSolaris() bool
    83  
    84  func (t *Target) IsNetbsd() bool
    85  
    86  func (t *Target) IsOpenbsd() bool
    87  
    88  func (t *Target) IsFreebsd() bool
    89  
    90  func (t *Target) IsBigEndian() bool
    91  
    92  func (t *Target) UsesLibc() bool