Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion internal/core/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,11 @@ func (p *Process) openMappedFile(fname string, m *Mapping) (*os.File, error) {
return backing.f, backing.err
}

if m.perm&Exec == 0 {
// Ignore mapped files without executable regions
return nil, nil
}

backing := &file{}

isMainExe := m.perm&Exec != 0 && p.mainExecName == "" // first executable region
Expand Down Expand Up @@ -638,7 +643,7 @@ func (p *Process) readDebugInfo() error {
}
e, err := elf.NewFile(f.f)
if err != nil {
return err
return fmt.Errorf("can't open EFL file %s: %v", f.f.Name(), err)
}

syms, err := e.Symbols()
Expand Down