mirror of
https://github.com/golang/go
synced 2024-11-24 03:30:18 -07:00
cmd/link: use keyed literal for AbiSymKindToSymKind
The correspondence is clearer. Also avoid accidental mismatch. Change-Id: Ibd9a31cfcd7c2301614f3496cac67cbae99972a9 Reviewed-on: https://go-review.googlesource.com/c/go/+/351334 Trust: Cherry Mui <cherryyz@google.com> Reviewed-by: Than McIntosh <thanm@google.com>
This commit is contained in:
parent
55d22f7490
commit
74ba70be68
@ -30,6 +30,8 @@
|
||||
|
||||
package sym
|
||||
|
||||
import "cmd/internal/objabi"
|
||||
|
||||
// A SymKind describes the kind of memory represented by a symbol.
|
||||
type SymKind uint8
|
||||
|
||||
@ -123,24 +125,24 @@ const (
|
||||
// AbiSymKindToSymKind maps values read from object files (which are
|
||||
// of type cmd/internal/objabi.SymKind) to values of type SymKind.
|
||||
var AbiSymKindToSymKind = [...]SymKind{
|
||||
Sxxx,
|
||||
STEXT,
|
||||
SRODATA,
|
||||
SNOPTRDATA,
|
||||
SDATA,
|
||||
SBSS,
|
||||
SNOPTRBSS,
|
||||
STLSBSS,
|
||||
SDWARFCUINFO,
|
||||
SDWARFCONST,
|
||||
SDWARFFCN,
|
||||
SDWARFABSFCN,
|
||||
SDWARFTYPE,
|
||||
SDWARFVAR,
|
||||
SDWARFRANGE,
|
||||
SDWARFLOC,
|
||||
SDWARFLINES,
|
||||
SLIBFUZZER_EXTRA_COUNTER,
|
||||
objabi.Sxxx: Sxxx,
|
||||
objabi.STEXT: STEXT,
|
||||
objabi.SRODATA: SRODATA,
|
||||
objabi.SNOPTRDATA: SNOPTRDATA,
|
||||
objabi.SDATA: SDATA,
|
||||
objabi.SBSS: SBSS,
|
||||
objabi.SNOPTRBSS: SNOPTRBSS,
|
||||
objabi.STLSBSS: STLSBSS,
|
||||
objabi.SDWARFCUINFO: SDWARFCUINFO,
|
||||
objabi.SDWARFCONST: SDWARFCONST,
|
||||
objabi.SDWARFFCN: SDWARFFCN,
|
||||
objabi.SDWARFABSFCN: SDWARFABSFCN,
|
||||
objabi.SDWARFTYPE: SDWARFTYPE,
|
||||
objabi.SDWARFVAR: SDWARFVAR,
|
||||
objabi.SDWARFRANGE: SDWARFRANGE,
|
||||
objabi.SDWARFLOC: SDWARFLOC,
|
||||
objabi.SDWARFLINES: SDWARFLINES,
|
||||
objabi.SLIBFUZZER_EXTRA_COUNTER: SLIBFUZZER_EXTRA_COUNTER,
|
||||
}
|
||||
|
||||
// ReadOnly are the symbol kinds that form read-only sections. In some
|
||||
|
Loading…
Reference in New Issue
Block a user