Go to the documentation of this file.
15 #include "absl/strings/substitute.h"
45 "Compiler options broke LIEF struct layout");
47 "Compiler options broke LIEF struct layout");
49 "Compiler options broke LIEF struct layout");
51 "Compiler options broke LIEF struct layout");
54 "Compiler options broke LIEF struct layout");
57 "Compiler options broke LIEF struct layout");
59 "Compiler options broke LIEF struct layout");
61 "Compiler options broke LIEF struct layout");
64 "Compiler options broke PE_TYPE size");
147 if ((sections_offset + sections_size) >
data_.
size()) {
183 template <
class Func>
199 sink->AddRange(
"pe_sections",
section.name, vmaddr, vmsize, section_data);
211 sink->AddRange(
"pe_catchall",
"[PE Section Headers]",
begin,
215 sink->AddFileRange(
"pe_catchall",
"[Unmapped]",
sink->input_file().data());
221 std::unique_ptr<pe::PeFile> pe)
229 void ProcessFile(
const std::vector<RangeSink*>& sinks)
const override {
230 for (
auto sink : sinks) {
231 switch (
sink->data_source()) {
247 THROW(
"PE doesn't support this data source");
255 WARN(
"PE files do not support disassembly yet");
282 return std::unique_ptr<ObjectFile>(
string_view section_headers() const
uint32_t raw_size() const
uint32_t section_count() const
OPENSSL_EXPORT const char * section
static uintptr_t Magic(uintptr_t magic, AllocList::Header *ptr)
constexpr uint16_t dos_magic
void ProcessFile(const std::vector< RangeSink * > &sinks) const override
bool GetDisassemblyInfo(string_view, DataSource, DisassemblyInfo *) const override
constexpr size_t kImportDirectoryTableEntrySize
uint32_t raw_offset() const
constexpr size_t kBaseRelocationBlockSize
uint32_t virtual_addr() const
Section(string_view header_data)
constexpr size_t kSymbol32Size
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
constexpr size_t kResourceDataEntrySize
const InputFile & file_data() const
constexpr absl::remove_reference_t< T > && move(T &&t) noexcept
void ForEachSection(const PeFile &pe, Func &§ion_func)
constexpr size_type size() const noexcept
std::unique_ptr< ObjectFile > TryOpenPEFile(std::unique_ptr< InputFile > &file)
string_view pe_headers() const
FuncOutput(*)(const void *, FuncInput) Func
constexpr size_t kRelocationSize
static const char PE_Magic[]
The PE signature bytes that follows the DOS stub header.
std::string GetBuildId() const override
void CheckedAdd(int64_t *accum, int64_t val)
constexpr size_t kSectionSize
unsigned __int64 uint64_t
uint64_t CheckedMul(uint64_t a, uint64_t b)
constexpr size_t kNameSize
string_view section_header(size_t n) const
void ParseSections(const PeFile &pe, RangeSink *sink)
pe_dos_header dos_header_
constexpr size_t kHeader32Size
PEObjectFile(std::unique_ptr< InputFile > file_data, std::unique_ptr< pe::PeFile > pe)
bool ReadMagic(const string_view &data)
absl::string_view string_view
string_view entire_file() const
void AddCatchAll(const PeFile &pe, RangeSink *sink)
std::unique_ptr< pe::PeFile > pe_file
size_t strnlen(const char *str, size_t maxlen)
string_view section_headers_
constexpr size_t kHeader16Size
Sizes in bytes of various things in the COFF format.
string_view GetRegion(uint64_t start, uint64_t n) const
constexpr size_t kResourceDirectoryTableSize
constexpr const_pointer data() const noexcept
constexpr size_t kSymbol16Size
uint32_t PointerToRawData
absl::string_view StrictSubstr(absl::string_view data, size_t off, size_t n)
uint32_t virtual_size() const
constexpr size_t kResourceDirectoryEntriesSize
grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:41