mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Clarify comments in the PE architecture detection
This commit is contained in:
@@ -596,14 +596,14 @@ PluginArchitecture find_plugin_architecture(fs::path plugin_path) {
|
|||||||
std::ifstream file(plugin_path, std::ifstream::binary | std::ifstream::in);
|
std::ifstream file(plugin_path, std::ifstream::binary | std::ifstream::in);
|
||||||
|
|
||||||
// The linker will place the offset where the PE signature is placed at the
|
// The linker will place the offset where the PE signature is placed at the
|
||||||
// end of the MS-DOS stub, at this offset
|
// end of the MS-DOS stub, at offset 0x3c
|
||||||
uint32_t pe_signature_offset;
|
uint32_t pe_signature_offset;
|
||||||
file.seekg(0x3c);
|
file.seekg(0x3c);
|
||||||
file.read(reinterpret_cast<char*>(&pe_signature_offset),
|
file.read(reinterpret_cast<char*>(&pe_signature_offset),
|
||||||
sizeof(pe_signature_offset));
|
sizeof(pe_signature_offset));
|
||||||
|
|
||||||
// The PE32 signature will be followed by a magic number.
|
// The PE32 signature will be followed by a magic number that indicates the
|
||||||
// file >> pe_signature_offset;
|
// target architecture of the binary
|
||||||
uint32_t pe_signature;
|
uint32_t pe_signature;
|
||||||
uint16_t machine_type;
|
uint16_t machine_type;
|
||||||
file.seekg(pe_signature_offset);
|
file.seekg(pe_signature_offset);
|
||||||
|
|||||||
Reference in New Issue
Block a user