mirror of
https://github.com/golang/go
synced 2024-11-15 04:30:32 -07:00
f229e7031a
When these packages are released as part of Go 1.18, Go 1.16 will no longer be supported, so we can remove the +build tags in these files. Ran go fix -fix=buildtag std cmd and then reverted the bootstrapDirs as defined in src/cmd/dist/buildtool.go, which need to continue to build with Go 1.4 for now. Also reverted src/vendor and src/cmd/vendor, which will need to be updated in their own repos first. Manual changes in runtime/pprof/mprof_test.go to adjust line numbers. For #41184. Change-Id: Ic0f93f7091295b6abc76ed5cd6e6746e1280861e Reviewed-on: https://go-review.googlesource.com/c/go/+/344955 Trust: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com>
80 lines
2.8 KiB
Go
80 lines
2.8 KiB
Go
// Copyright 2018 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
//go:build linux && (386 || arm)
|
|
|
|
package runtime
|
|
|
|
// ELF32 structure definitions for use by the vDSO loader
|
|
|
|
type elfSym struct {
|
|
st_name uint32
|
|
st_value uint32
|
|
st_size uint32
|
|
st_info byte
|
|
st_other byte
|
|
st_shndx uint16
|
|
}
|
|
|
|
type elfVerdef struct {
|
|
vd_version uint16 /* Version revision */
|
|
vd_flags uint16 /* Version information */
|
|
vd_ndx uint16 /* Version Index */
|
|
vd_cnt uint16 /* Number of associated aux entries */
|
|
vd_hash uint32 /* Version name hash value */
|
|
vd_aux uint32 /* Offset in bytes to verdaux array */
|
|
vd_next uint32 /* Offset in bytes to next verdef entry */
|
|
}
|
|
|
|
type elfEhdr struct {
|
|
e_ident [_EI_NIDENT]byte /* Magic number and other info */
|
|
e_type uint16 /* Object file type */
|
|
e_machine uint16 /* Architecture */
|
|
e_version uint32 /* Object file version */
|
|
e_entry uint32 /* Entry point virtual address */
|
|
e_phoff uint32 /* Program header table file offset */
|
|
e_shoff uint32 /* Section header table file offset */
|
|
e_flags uint32 /* Processor-specific flags */
|
|
e_ehsize uint16 /* ELF header size in bytes */
|
|
e_phentsize uint16 /* Program header table entry size */
|
|
e_phnum uint16 /* Program header table entry count */
|
|
e_shentsize uint16 /* Section header table entry size */
|
|
e_shnum uint16 /* Section header table entry count */
|
|
e_shstrndx uint16 /* Section header string table index */
|
|
}
|
|
|
|
type elfPhdr struct {
|
|
p_type uint32 /* Segment type */
|
|
p_offset uint32 /* Segment file offset */
|
|
p_vaddr uint32 /* Segment virtual address */
|
|
p_paddr uint32 /* Segment physical address */
|
|
p_filesz uint32 /* Segment size in file */
|
|
p_memsz uint32 /* Segment size in memory */
|
|
p_flags uint32 /* Segment flags */
|
|
p_align uint32 /* Segment alignment */
|
|
}
|
|
|
|
type elfShdr struct {
|
|
sh_name uint32 /* Section name (string tbl index) */
|
|
sh_type uint32 /* Section type */
|
|
sh_flags uint32 /* Section flags */
|
|
sh_addr uint32 /* Section virtual addr at execution */
|
|
sh_offset uint32 /* Section file offset */
|
|
sh_size uint32 /* Section size in bytes */
|
|
sh_link uint32 /* Link to another section */
|
|
sh_info uint32 /* Additional section information */
|
|
sh_addralign uint32 /* Section alignment */
|
|
sh_entsize uint32 /* Entry size if section holds table */
|
|
}
|
|
|
|
type elfDyn struct {
|
|
d_tag int32 /* Dynamic entry type */
|
|
d_val uint32 /* Integer value */
|
|
}
|
|
|
|
type elfVerdaux struct {
|
|
vda_name uint32 /* Version or dependency names */
|
|
vda_next uint32 /* Offset in bytes to next verdaux entry */
|
|
}
|