Home | History | Annotate | Download | only in pe

Lines Matching defs:String

13 // cstring converts ASCII byte sequence b to string.
15 func cstring(b []byte) string {
19 return string(b[:i])
22 // StringTable is a COFF string table.
26 // COFF string table is located right after COFF symbol table.
33 return nil, fmt.Errorf("fail to seek to string table: %v", err)
38 return nil, fmt.Errorf("fail to read string table length: %v", err)
40 // string table length includes itself
48 return nil, fmt.Errorf("fail to read string table: %v", err)
55 // String extracts string from COFF string table st at offset start.
56 func (st StringTable) String(start uint32) (string, error) {
57 // start includes 4 bytes of string table length
59 return "", fmt.Errorf("offset %d is before the start of string table", start)
63 return "", fmt.Errorf("offset %d is beyond the end of string table", start)