1 // Copyright 2016 The Chromium Authors
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef COURGETTE_REL32_FINDER_X64_H_
6 #define COURGETTE_REL32_FINDER_X64_H_
12 #include "courgette/image_utils.h"
13 #include "courgette/rel32_finder.h"
17 // This implementation performs naive scan for opcodes having rel32 as
18 // arguments, disregarding instruction alignment.
19 class Rel32FinderX64 : public Rel32Finder {
21 Rel32FinderX64(RVA relocs_start_rva, RVA relocs_end_rva, RVA size_of_image);
22 ~Rel32FinderX64() override = default;
24 void Find(const uint8_t* start_pointer,
25 const uint8_t* end_pointer,
28 const std::vector<RVA>& abs32_locations) override;
31 uint32_t size_of_image_;
34 } // namespace courgette
36 #endif // COURGETTE_REL32_FINDER_X64_H_