diff options
Diffstat (limited to 'src/cmd/internal/objfile/objfile.go')
| -rw-r--r-- | src/cmd/internal/objfile/objfile.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/internal/objfile/objfile.go b/src/cmd/internal/objfile/objfile.go index 48ed9ed489..e5d99f086b 100644 --- a/src/cmd/internal/objfile/objfile.go +++ b/src/cmd/internal/objfile/objfile.go @@ -18,6 +18,7 @@ type rawFile interface { pcln() (textStart uint64, symtab, pclntab []byte, err error) text() (textStart uint64, text []byte, err error) goarch() string + loadAddress() (uint64, error) dwarf() (*dwarf.Data, error) } @@ -95,6 +96,13 @@ func (f *File) GOARCH() string { return f.raw.goarch() } +// LoadAddress returns the expected load address of the file. +// This differs from the actual load address for a position-independent +// executable. +func (f *File) LoadAddress() (uint64, error) { + return f.raw.loadAddress() +} + // DWARF returns DWARF debug data for the file, if any. // This is for cmd/pprof to locate cgo functions. func (f *File) DWARF() (*dwarf.Data, error) { |
