macho/macho-go/proto/macho_info.proto

35 lines
813 B
Protocol Buffer
Raw Normal View History

2023-05-31 16:17:03 +07:00
syntax = "proto3";
option optimize_for = LITE_RUNTIME;
option go_package = "pkg/protomodel";
package protomodel;
message MachoInfo {
enum PointerSize {
invalid = 0;
p32 = 1;
p64 = 2;
}
message InitPointer {
uint64 offset = 1; // offset relative to the macho header
uint64 value = 2; // address of the init function
}
2023-06-15 10:41:18 +07:00
// right now we waste memory to store name/hash for all symbols
// should consider compress them, dyld stores the index in list of LC_DYLIB
message BindSymbol {
string name = 1;
string libname = 2;
uint32 libhash = 3;
uint32 segment = 4; // segment index
uint64 offset = 5; // offset in segment
}
2023-05-31 16:17:03 +07:00
PointerSize pointer_size = 1;
uint64 image_base = 2;
repeated InitPointer init_pointers = 3;
2023-06-15 10:41:18 +07:00
repeated BindSymbol symbols = 4;
2023-05-31 16:17:03 +07:00
}