Skip to content

ELFIO migration: add elf_impl::save(); update transitional ELFIO comments - #10130

Merged
stsoe merged 1 commit into
Xilinx:masterfrom
stsoe:rm_elfio
Oct 21, 2026
Merged

stsoe merged 1 commit into
Xilinx:masterfrom
stsoe:rm_elfio

Conversation

@stsoe

@stsoe stsoe commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator

Problem solved by the commit

Add elf_impl::save for use by XDP. This avoids an XDP dependency on ELFIO.

How problem was solved, alternative solutions (if any) and why they were rejected

  • Add elf_impl::save(std::ostream&) forwarding to aiebu::elf::save(), so callers no longer need to reach through get_elfio() just to serialise an ELF back to a byte buffer
  • Add missing and includes to hip_module.cpp (memcmp, strlen, std::map were used without explicit includes)
  • Update transitional comments in elf_int.h to name the two remaining get_elfio() consumers (xdp elf_helper.cpp, dtrace.h) and the steps needed to remove each one

get_elfio() and the elfio.hpp include remain until the xdp submodule is updated to call save() and dtrace.h is updated to accept const aiebu::elf& instead of const ELFIO::elfio&.

Risks (if any) associated the changes in the commit

None, purely additive.

- Add elf_impl::save(std::ostream&) forwarding to aiebu::elf::save(),
  so callers no longer need to reach through get_elfio() just to
  serialise an ELF back to a byte buffer
- Add missing <cstring> and <map> includes to hip_module.cpp (memcmp,
  strlen, std::map were used without explicit includes)
- Update transitional comments in elf_int.h to name the two remaining
  get_elfio() consumers (xdp elf_helper.cpp, dtrace.h) and the steps
  needed to remove each one

get_elfio() and the elfio.hpp include remain until the xdp submodule
is updated to call save() and dtrace.h is updated to accept
const aiebu::elf& instead of const ELFIO::elfio&.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Soren Soe <2106410+stsoe@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@stsoe
stsoe merged commit 676a145 into Xilinx:master Oct 21, 2026
35 of 47 checks passed
@stsoe
stsoe deleted the rm_elfio branch October 21, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant