1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-10 19:26:38 +03:00

[Mach-O] wip

This commit is contained in:
Rui Ueyama 2021-09-14 15:28:28 +09:00
parent f81c869d8f
commit 568bba75c6
2 changed files with 12 additions and 1 deletions

View File

@ -309,6 +309,12 @@ struct BuildVersionCommand {
u32 ntools; u32 ntools;
}; };
struct SourceVersionCommand {
u32 cmd;
u32 cmdsize;
u32 version;
};
struct DataInCodeEntry { struct DataInCodeEntry {
u32 offset; u32 offset;
u32 length; u32 length;

View File

@ -200,8 +200,13 @@ int main(int argc, char **argv) {
<< "\n"; << "\n";
break; break;
} }
case LC_SOURCE_VERSION: case LC_SOURCE_VERSION: {
std::cout << "LC_SOURCE_VERSION\n"; std::cout << "LC_SOURCE_VERSION\n";
SourceVersionCommand &cmd = *(SourceVersionCommand *)&lc;
std::cout << " version: 0x" << cmd.version
<< "\n";
break;
}
break; break;
case LC_BUILD_VERSION: { case LC_BUILD_VERSION: {
std::cout << "LC_BUILD_VERSION\n"; std::cout << "LC_BUILD_VERSION\n";