[DynInst_API:] [dyninst/dyninst] ce5ae2: Fix logic on where to insert loadable sections


Date: Wed, 28 Jan 2026 08:13:31 -0800
From: bbiiggppiigg <noreply@xxxxxxxxxx>
Subject: [DynInst_API:] [dyninst/dyninst] ce5ae2: Fix logic on where to insert loadable sections
  Branch: refs/heads/bbiiggppiigg/fix-create-loadable-section-logic
  Home:   https://github.com/dyninst/dyninst
  Commit: ce5ae26b8df9e76f2f9fe82e978a739460553053
      https://github.com/dyninst/dyninst/commit/ce5ae26b8df9e76f2f9fe82e978a739460553053
  Author: wuxx1279 <bbiiggppiigg@xxxxxxxxx>
  Date:   2026-01-28 (Wed, 28 Jan 2026)

  Changed paths:
    M symtabAPI/src/emitElf.C

  Log Message:
  -----------
  Fix logic on where to insert loadable sections

Previously, Dyninst made the assumption that for the last PT_LOAD
segment, the last section in it will have its addr + offset
exactly matching the end of the segment (segment addr + offset).

However, we have seen binaries where such assumptions no longer holds.

This PR simply moves the logic of inserting the loadable sections
right after the last section of the last data segment, to the last
section, which should be permitted by the ELF standard.


  Commit: c28b7cfad176a889fe0797b6e6bbfdef6e2f59f0
      https://github.com/dyninst/dyninst/commit/c28b7cfad176a889fe0797b6e6bbfdef6e2f59f0
  Author: wuxx1279 <bbiiggppiigg@xxxxxxxxx>
  Date:   2026-01-28 (Wed, 28 Jan 2026)

  Changed paths:
    M symtabAPI/src/emitElf.C

  Log Message:
  -----------
  Various Fixes

Remove useless update to insertPoint
Remove flag for checking whether loadable sections has been created.
Add debug log when dyninst failed to create new sections.


Compare: https://github.com/dyninst/dyninst/compare/6cae32464b84...c28b7cfad176

To unsubscribe from these emails, change your notification settings at https://github.com/dyninst/dyninst/settings/notifications
[← Prev in Thread] Current Thread [Next in Thread→]
  • [DynInst_API:] [dyninst/dyninst] ce5ae2: Fix logic on where to insert loadable sections, bbiiggppiigg <=