summaryrefslogtreecommitdiff
path: root/src/cmd/internal/objfile/elf.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/internal/objfile/elf.go')
-rw-r--r--src/cmd/internal/objfile/elf.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cmd/internal/objfile/elf.go b/src/cmd/internal/objfile/elf.go
index 3bad034097..c8114603d7 100644
--- a/src/cmd/internal/objfile/elf.go
+++ b/src/cmd/internal/objfile/elf.go
@@ -106,6 +106,15 @@ func (f *elfFile) goarch() string {
return ""
}
+func (f *elfFile) loadAddress() (uint64, error) {
+ for _, p := range f.elf.Progs {
+ if p.Type == elf.PT_LOAD {
+ return p.Vaddr, nil
+ }
+ }
+ return 0, fmt.Errorf("unknown load address")
+}
+
func (f *elfFile) dwarf() (*dwarf.Data, error) {
return f.elf.DWARF()
}