diff --git a/src/rt/backtrace/elf.d b/src/rt/backtrace/elf.d index e2385c4ba3..fe8faa7f84 100644 --- a/src/rt/backtrace/elf.d +++ b/src/rt/backtrace/elf.d @@ -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; }