Lines Matching refs:file
32 file, err := elfSymbolsFromFile(r)
35 file, err = machoSymbolsFromFile(r)
38 file, err = peSymbolsFromFile(r)
49 file.r = r
51 return file, err
54 func InjectStringSymbol(file *File, w io.Writer, symbol, value, from string) error {
55 offset, size, err := findSymbol(file, symbol)
69 _, err := file.r.ReadAt(existing, int64(offset))
82 return copyAndInject(file.r, w, offset, buf)
85 func InjectUint64Symbol(file *File, w io.Writer, symbol string, value uint64) error {
86 offset, size, err := findSymbol(file, symbol)
98 return copyAndInject(file.r, w, offset, buf)
123 func findSymbol(file *File, symbolName string) (uint64, uint64, error) {
124 for i, symbol := range file.Symbols {
128 for n = i; n < len(file.Symbols); n++ {
129 if file.Symbols[n].Section != symbol.Section {
130 n = len(file.Symbols)
133 if file.Symbols[n].Addr > symbol.Addr {
141 if n < len(file.Symbols) {
142 end = file.Symbols[n].Addr