- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for shnum (0.04 sec)
-
src/cmd/link/internal/ld/elf.go
ehdr.Phnum++ } if elf64 { ehdr.Shoff += ELF64PHDRSIZE } else { ehdr.Shoff += ELF32PHDRSIZE } return e } func newElfShdr(name int64) *ElfShdr { e := new(ElfShdr) e.Name = uint32(name) e.shnum = elf.SectionIndex(ehdr.Shnum) if ehdr.Shnum >= NSECT { Errorf(nil, "too many shdrs") } else { shdr[ehdr.Shnum] = e ehdr.Shnum++ } return e }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 13:29:54 UTC 2024 - 63.6K bytes - Viewed (0) -
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/debug/elf/file.go
} if phoff < 0 { return nil, &FormatError{0, "invalid phoff", phoff} } if shoff == 0 && shnum != 0 { return nil, &FormatError{0, "invalid ELF shnum for shoff=0", shnum} } if shnum > 0 && shstrndx >= shnum { return nil, &FormatError{0, "invalid ELF shstrndx", shstrndx} } var wantPhentsize, wantShentsize int switch f.Class { case ELFCLASS32:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 23 16:49:58 UTC 2024 - 43.1K bytes - Viewed (0) -
src/cmd/link/internal/loadelf/ldelf.go
elfobj.shoff = hdr.Shoff elfobj.flags = hdr.Flags elfobj.ehsize = uint32(hdr.Ehsize) elfobj.phentsize = uint32(hdr.Phentsize) elfobj.phnum = uint32(hdr.Phnum) elfobj.shentsize = uint32(hdr.Shentsize) elfobj.shnum = uint32(hdr.Shnum) elfobj.shstrndx = uint32(hdr.Shstrndx) } else { elfobj.type_ = uint32(hdr.Type) elfobj.machine = uint32(hdr.Machine) elfobj.version = hdr.Version
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 16 15:12:12 UTC 2024 - 33.9K 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/link/internal/ld/symtab.go
ldr.Errorf(x, "missing section in putelfsym") return } if xosect.Elfsect == nil { ldr.Errorf(x, "missing ELF section in putelfsym") return } elfshnum = xosect.Elfsect.(*ElfShdr).shnum } sname := ldr.SymExtname(x) sname = mangleABIName(ctxt, ldr, x, sname) // One pass for each binding: elf.STB_LOCAL, elf.STB_GLOBAL, // maybe one day elf.STB_WEAK. bind := elf.STB_GLOBAL
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 13 16:29:40 UTC 2023 - 29.2K bytes - Viewed (0) -
src/debug/elf/elf.go
Ehsize uint16 /* Size of ELF header in bytes. */ Phentsize uint16 /* Size of program header entry. */ Phnum uint16 /* Number of program header entries. */ Shentsize uint16 /* Size of section header entry. */ Shnum uint16 /* Number of section header entries. */ Shstrndx uint16 /* Section name strings section. */ } // ELF32 Section header.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 16 00:01:16 UTC 2024 - 134.6K bytes - Viewed (0) -
src/debug/elf/file_test.go
h := Header32{ Ident: [16]byte{0x7F, 'E', 'L', 'F', 0x01, 0x01, 0x01}, Type: 1, Machine: 3, Version: 1, Shoff: 0x2DD44C, Ehsize: 0x34, Shentsize: 0x28, Shnum: 0, Shstrndx: 0xFFFF, } binary.Write(&buf, binary.LittleEndian, h) // Zero out sections [1]~[65294]. buf.Write(bytes.Repeat([]byte{0}, 0x13ED1C-binary.Size(h)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 22 16:22:42 UTC 2023 - 60.1K bytes - Viewed (0) -
src/cmd/link/internal/ld/dwarf.go
return } ldr := ctxt.loader for _, si := range dwarfp { s := si.secSym() sect := ldr.SymSect(si.secSym()) putelfsectionsym(ctxt, ctxt.Out, s, sect.Elfsect.(*ElfShdr).shnum) } } // dwarfcompress compresses the DWARF sections. Relocations are applied // on the fly. After this, dwarfp will contain a different (new) set of // symbols, and sections may have been replaced.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 16:25:18 UTC 2024 - 72.4K 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)