24#include "pw_bytes/span.h"
25#include "pw_elf/internal/reader_impl.h"
26#include "pw_result/result.h"
27#include "pw_status/status.h"
28#include "pw_status/try.h"
29#include "pw_stream/stream.h"
59 return std::visit([](
auto&& impl) ->
auto& {
return impl.stream(); },
81 return std::visit([name](
auto&& impl) {
return impl.SeekToSection(name); },
101 Result<std::vector<std::byte>>
ReadSection(std::string_view name);
104 internal::ElfReaderImpls impl_;
106 ElfReader(internal::ElfReaderImpls&& impl) : impl_(std::move(impl)) {}
Definition: status_with_size.h:49
A basic reader for ELF files.
Definition: reader.h:34
stream::SeekableReader & stream() const
Gets the associated stream.
Definition: reader.h:58
Result< std::vector< std::byte > > ReadSection(std::string_view name)
StatusWithSize SeekToSection(std::string_view name)
Definition: reader.h:80
static Result< ElfReader > FromStream(stream::SeekableReader &stream)