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

     1  // Copyright 2017 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 sym
     6  
     7  import (
     8  	"github.com/shogo82148/std/cmd/internal/objabi"
     9  	"github.com/shogo82148/std/cmd/internal/sys"
    10  )
    11  
    12  // RelocVariant is a linker-internal variation on a relocation.
    13  type RelocVariant uint8
    14  
    15  const (
    16  	RV_NONE RelocVariant = iota
    17  	RV_POWER_LO
    18  	RV_POWER_HI
    19  	RV_POWER_HA
    20  	RV_POWER_DS
    21  
    22  	// RV_390_DBL is a s390x-specific relocation variant that indicates that
    23  	// the value to be placed into the relocatable field should first be
    24  	// divided by 2.
    25  	RV_390_DBL
    26  
    27  	RV_CHECK_OVERFLOW RelocVariant = 1 << 7
    28  	RV_TYPE_MASK      RelocVariant = RV_CHECK_OVERFLOW - 1
    29  )
    30  
    31  func RelocName(arch *sys.Arch, r objabi.RelocType) string