Skip to content

Commit

Permalink
Superrefs
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Dec 31, 2010
1 parent 08d4d09 commit bee47d7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion fixobjc2.idc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ static create_structs () {

static main () {
auto cl_ea, cl_base, c_ea, s_base, s_ea, s_name, cr_base, cr_ea, cr_target;
auto cat_base, cat_ea;
auto cat_base, cat_ea;
auto sr_base, sr_ea, sr_target;

if (GetLongPrm(INF_FILETYPE) != 25 || (GetLongPrm(INF_PROCNAME) & 0xffffff) != 0x4d5241) {
Warning("fixobjc2.idc only works for Mach-O binaries with ARM processors.");
Expand Down Expand Up @@ -210,6 +211,17 @@ static main () {
}
}

// name all superrefs
sr_base = SegByBase(SegByName("__objc_superrefs"));
if (sr_base >= 0) {
for (sr_ea = SegStart(sr_base); sr_ea != SegEnd(sr_base); sr_ea = sr_ea + 4) {
sr_target = Dword(sr_ea);
if (sr_target > 0) {
MakeRptCmt(sr_ea, Name(sr_target));
}
}
}

// categories.
cat_base = SegByBase(SegByName("__objc_catlist"));
if (cat_base >= 0) {
Expand Down

0 comments on commit bee47d7

Please sign in to comment.