- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for Shnum (0.04 sec)
-
src/runtime/pprof/elf.go
case 2: // big-endian byteOrder = binary.BigEndian } var shnum int var shoff, shentsize int64 switch buf[4] { default: return "", errBadELF case 1: // 32-bit file header shoff = int64(byteOrder.Uint32(buf[32:])) shentsize = int64(byteOrder.Uint16(buf[46:])) if shentsize != 40 { return "", errBadELF } shnum = int(byteOrder.Uint16(buf[48:])) case 2: // 64-bit file header
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 08 01:09:18 UTC 2017 - 2.8K bytes - Viewed (0) -
src/cmd/internal/buildid/note.go
// at least 4 kB out, in data. func readELF(name string, f *os.File, data []byte) (buildid string, err error) { // Assume the note content is in the data, already read. // Rewrite the ELF header to set shoff and shnum to 0, so that we can pass // the data to elf.NewFile and it will decode the Prog list but not // try to read the section headers and the string table from disk. // That's a waste of I/O when all we care about is the Prog list
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Aug 17 20:40:42 UTC 2023 - 6K bytes - Viewed (0) -
src/cmd/internal/buildid/buildid_test.go
var hdr elf.Header64 if err := binary.Read(bytes.NewReader(data), order, &hdr); err != nil { t.Error(err) continue } phoff := hdr.Phoff phnum := int(hdr.Phnum) phsize := uint64(hdr.Phentsize) for i := 0; i < phnum; i++ { var phdr elf.Prog64 if err := binary.Read(bytes.NewReader(data[phoff:]), order, &phdr); err != nil { t.Error(err) continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:31:28 UTC 2024 - 6.6K bytes - Viewed (0)