mirror of
https://github.com/rui314/mold.git
synced 2024-11-13 09:39:13 +03:00
[Mach-O] wip
This commit is contained in:
parent
de34da86a0
commit
4fee9df38d
@ -401,8 +401,18 @@ void dump_file(std::string path) {
|
||||
LinkEditDataCommand &cmd = *(LinkEditDataCommand *)&lc;
|
||||
std::cout << " dataoff: 0x" << cmd.dataoff
|
||||
<< "\n datasize: 0x" << cmd.datasize
|
||||
<< "\n data: ";
|
||||
print_bytes(buf + cmd.dataoff, cmd.datasize);
|
||||
<< "\n data:";
|
||||
|
||||
u8 *p = buf + cmd.dataoff;
|
||||
u64 addr = 0;
|
||||
for (;;) {
|
||||
u64 delta = read_uleb(p);
|
||||
if (!delta)
|
||||
break;
|
||||
addr += delta;
|
||||
std::cout << std::hex << " 0x" << addr;
|
||||
}
|
||||
std::cout << "\n";
|
||||
break;
|
||||
}
|
||||
case LC_MAIN: {
|
||||
|
Loading…
Reference in New Issue
Block a user