Upload upstream chromium 73.0.3683.0
[platform/framework/web/chromium-efl.git] / courgette / rel32_finder_x86.h
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef COURGETTE_REL32_FINDER_X86_H_
6 #define COURGETTE_REL32_FINDER_X86_H_
7
8 #include <stdint.h>
9
10 #include <vector>
11
12 #include "courgette/image_utils.h"
13 #include "courgette/rel32_finder.h"
14
15 namespace courgette {
16
17 // This implementation performs naive scan for opcodes having rel32 as
18 // arguments, disregarding instruction alignment.
19 class Rel32FinderX86 : public Rel32Finder {
20  public:
21   Rel32FinderX86(RVA relocs_start_rva, RVA relocs_end_rva);
22   ~Rel32FinderX86() override = default;
23
24   void Find(const uint8_t* start_pointer,
25             const uint8_t* end_pointer,
26             RVA start_rva,
27             RVA end_rva,
28             const std::vector<RVA>& abs32_locations) override;
29 };
30
31 }  // namespace courgette
32
33 #endif  // COURGETTE_REL32_FINDER_X86_H_