#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "components/zucchini/rel32_finder.h"
#include <algorithm>
#include "base/numerics/safe_conversions.h"
namespace zucchini {
Abs32GapFinder::Abs32GapFinder(ConstBufferView image,
ConstBufferView region,
const std::deque<offset_t>& abs32_locations,
size_t abs32_width)
: … { … }
Abs32GapFinder::~Abs32GapFinder() = default;
bool Abs32GapFinder::FindNext() { … }
Rel32Finder::Rel32Finder(ConstBufferView image,
const AddressTranslator& translator)
: … { … }
Rel32Finder::~Rel32Finder() = default;
void Rel32Finder::SetRegion(ConstBufferView region) { … }
bool Rel32Finder::FindNext() { … }
void Rel32Finder::Accept() { … }
Rel32Finder::NextIterators Rel32FinderIntel::SetResult(
ConstBufferView::const_iterator cursor,
uint32_t opcode_size,
bool can_point_outside_section) { … }
Rel32Finder::NextIterators Rel32FinderX86::Scan(ConstBufferView region) { … }
Rel32Finder::NextIterators Rel32FinderX64::Scan(ConstBufferView region) { … }
template <typename ADDR_TYPE>
Rel32FinderArm<ADDR_TYPE>::Rel32FinderArm(ConstBufferView image,
const AddressTranslator& translator)
: … { … }
template <typename ADDR_TYPE>
Rel32FinderArm<ADDR_TYPE>::~Rel32FinderArm() = default;
template <typename ADDR_TYPE>
Rel32Finder::NextIterators Rel32FinderArm<ADDR_TYPE>::SetResult(
Result&& result,
ConstBufferView::const_iterator cursor,
int instr_size) { … }
template <typename ADDR_TYPE>
Rel32Finder::NextIterators Rel32FinderArm<ADDR_TYPE>::SetEmptyResult() { … }
Rel32FinderAArch32::Rel32FinderAArch32(ConstBufferView image,
const AddressTranslator& translator,
bool is_thumb2)
: … { … }
Rel32FinderAArch32::~Rel32FinderAArch32() = default;
Rel32Finder::NextIterators Rel32FinderAArch32::ScanA32(ConstBufferView region) { … }
Rel32Finder::NextIterators Rel32FinderAArch32::ScanT32(ConstBufferView region) { … }
Rel32Finder::NextIterators Rel32FinderAArch32::Scan(ConstBufferView region) { … }
Rel32FinderAArch64::Rel32FinderAArch64(ConstBufferView image,
const AddressTranslator& translator)
: … { … }
Rel32FinderAArch64::~Rel32FinderAArch64() = default;
Rel32Finder::NextIterators Rel32FinderAArch64::Scan(ConstBufferView region) { … }
}