Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
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
12 changes: 2 additions & 10 deletions src/rt/backtrace/elf.d
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,8 @@ struct Image
return 0;

obj.set = true;
// search for the executable code segment
foreach (const ref phdr; info.dlpi_phdr[0 .. info.dlpi_phnum])
{
if (phdr.p_type == PT_LOAD && phdr.p_flags & PF_X)
{
obj.begin = info.dlpi_addr + phdr.p_vaddr;
return 0;
}
}
// fall back to the base address of the object file

// use the base address of the object file
obj.begin = info.dlpi_addr;
return 0;
}
Expand Down