-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Machine code fix + missing relocations #193
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! A few questions about where the constants came from.
constexpr std::uint16_t IMAGE_FILE_MACHINE_R4000 = 0x166; // MIPS little endian | ||
constexpr std::uint16_t IMAGE_FILE_MACHINE_R10000 = 0x166; // MIPS little endian | ||
constexpr std::uint16_t IMAGE_FILE_MACHINE_R10000 = 0x168; // MIPS little endian |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This came from Radare, right? I don't see it in the MSDN docs.
constexpr std::uint16_t IMAGE_FILE_MACHINE_RISCV32 = 0x5032; // RISC-V 32-bit address space | ||
constexpr std::uint16_t IMAGE_FILE_MACHINE_RISCV64 = 0x5064; // RISC-V 64-bit address space | ||
constexpr std::uint16_t IMAGE_FILE_MACHINE_RISCV128 = 0x5128; // RISC-V 128-bit address space | ||
constexpr std::uint16_t IMAGE_FILE_MACHINE_SH3 = 0x1a2; // Hitachi SH3 | ||
constexpr std::uint16_t IMAGE_FILE_MACHINE_SH3DSP = 0x1a3; // Hitachi SH3 DSP | ||
constexpr std::uint16_t IMAGE_FILE_MACHINE_SH3E = 0x1a4; // Hitachi SH3E |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question for this one 🙂
From the MSDN website there's described the followings: Relocations are taken from this site: https://learn.microsoft.com/en-us/windows/win32/debug/pe-format PowerPC BE is usually not documented anywhere as it was used exclusively for Xbox360, but under this repository from Ms we can see it's definition https://github.com/microsoft/microsoft-pdb/blob/master/cvdump/dumppdb.cpp |
Got it, thanks! The lint needs to be fixed, but otherwise this LGTM. |
Is it related to formatting issue I suppose? I have to run clang-format? |
Yep, correct. There should be a target for it in the CMake-based build. |
Should be ok now |
Thanks @lakor64! |
Info gathered from MSDN PE Format documentation page and radare2 pe header file