Skip to content

Elf decompress - #9975

Open
sayyanna wants to merge 6 commits into
Xilinx:masterfrom
sayyanna:elf_decompress
Open

Elf decompress#9975
sayyanna wants to merge 6 commits into
Xilinx:masterfrom
sayyanna:elf_decompress

Conversation

@sayyanna

@sayyanna sayyanna commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Problem solved by the commit

Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered

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

Risks (if any) associated the changes in the commit

What has been tested and how, request additional testing if necessary

Documentation impact (if any)

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

if (sec->get_flags() & ELFIO::SHF_COMPRESSED) {
entry.elf_class = elf_class;
entry.uncompressed_size =
aiebu::aiebu_assembler::get_uncompressed_section_size(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'get_uncompressed_section_size' in 'aiebu::aiebu_assembler' [clang-diagnostic-error]

=
                                    ^

for (const auto& v : m_views) {
if (v.uncompressed_size > 0) {
// Decompress directly into destination buffer
aiebu::aiebu_assembler::decompress_section_into(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: no member named 'decompress_section_into' in 'aiebu::aiebu_assembler' [clang-diagnostic-error]

r
                                  ^

@stsoe

stsoe commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

These changes are pretty straight forward. I know this is a draft. Please explain the significance of the elf_class optional argument, it isn't apparent to me.

// Compressed views are decompressed directly into dest via zstd.
// Uncompressed views are memcpy'd as before.
void
copy_to(void* dest) const

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated to your changes, but horrible signature. Should be a span (std::span) of some sort. Since std::span is c++20 use xrt::detail::span, check other code.

Ignore this comment for the sake of this PR, but someone has to fix.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions


#include "ert.h"

#include "core/common/aiebu/src/cpp/include/aiebu/aiebu_decompress.h"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: 'core/common/aiebu/src/cpp/include/aiebu/aiebu_decompress.h' file not found [clang-diagnostic-error]

#include "core/common/aiebu/src/cpp/include/aiebu/aiebu_decompress.h"
         ^

Signed-off-by: Sri Latha Ayyannagari <[email protected]>
Signed-off-by: Sri Latha Ayyannagari <[email protected]>
Signed-off-by: Sri Latha Ayyannagari <[email protected]>
Signed-off-by: Sri Latha Ayyannagari <[email protected]>
Signed-off-by: Sri Latha Ayyannagari <[email protected]>
@sayyanna
sayyanna marked this pull request as ready for review August 14, 2026 21:26
@github-actions

Copy link
Copy Markdown
Contributor

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


// Create mutable copy for buffer cache
std::vector<uint8_t> ctrlpkt_data(ctrl_packet.data(),
ctrl_packet.data() + ctrl_packet.size());

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we constructing with the compressed control packet data but using uncompressed size? We should make sure to run compress regression on STX w and w/o control packet.

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.

3 participants