Elf decompress - #9975
Conversation
| if (sec->get_flags() & ELFIO::SHF_COMPRESSED) { | ||
| entry.elf_class = elf_class; | ||
| entry.uncompressed_size = | ||
| aiebu::aiebu_assembler::get_uncompressed_section_size( |
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
warning: no member named 'decompress_section_into' in 'aiebu::aiebu_assembler' [clang-diagnostic-error]
r
^|
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 |
There was a problem hiding this comment.
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.
|
|
||
| #include "ert.h" | ||
|
|
||
| #include "core/common/aiebu/src/cpp/include/aiebu/aiebu_decompress.h" |
There was a problem hiding this comment.
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]>
Signed-off-by: Sri Latha Ayyannagari <[email protected]>
ab29c89 to
98f48f5
Compare
|
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()); |
There was a problem hiding this comment.
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.
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)