Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 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_X64_H_ | |
| 6 #define COURGETTE_REL32_FINDER_X64_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 | |
|
huangs
2016/05/30 05:48:34
NIT: Unwrap comment.
etiennep
2016/05/30 17:07:30
Done.
| |
| 18 // as arguments, disregarding instruction alignment. | |
| 19 class Rel32FinderX64 : public Rel32Finder { | |
| 20 public: | |
| 21 Rel32FinderX64(RVA relocs_start_rva, RVA relocs_end_rva, RVA size_of_image); | |
| 22 ~Rel32FinderX64() 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 private: | |
| 31 uint32_t size_of_image_; | |
| 32 }; | |
| 33 | |
| 34 } // namespace courgette | |
| 35 | |
| 36 #endif // COURGETTE_REL32_FINDER_X64_H_ | |
| OLD | NEW |