Skip to content

Commit

Permalink
Fix endianess issues for generating _init and _fini functions on power
Browse files Browse the repository at this point in the history
  • Loading branch information
mxz297 committed Feb 19, 2019
1 parent 967edfc commit f65c72a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions dyninstAPI/src/unix.C
Original file line number Diff line number Diff line change
Expand Up @@ -842,9 +842,9 @@ void BinaryEdit::makeInitAndFiniIfNeeded()
emptyFuncSize = 5;
}
#elif defined (arch_power)
static unsigned char empty[] = { 0x4e, 0x80, 0x00, 0x20};
emptyFunction = empty;
emptyFuncSize = 4;
static unsigned empty[] = {0x4e800020};
emptyFunction = (unsigned char*) empty;
emptyFuncSize = 4;
#endif //defined(arch_x86) || defined(arch_x86_64)
linkedFile->addRegion(highWaterMark_, (void*)(emptyFunction), emptyFuncSize, ".init.dyninst",
Dyninst::SymtabAPI::Region::RT_TEXT, true);
Expand Down Expand Up @@ -890,8 +890,8 @@ void BinaryEdit::makeInitAndFiniIfNeeded()
}

#elif defined (arch_power)
static unsigned char empty[] = { 0x4e, 0x80, 0x00, 0x20};
emptyFunction = empty;
static unsigned empty[] = {0x4e800020};
emptyFunction = (unsigned char*) empty;
emptyFuncSize = 4;

#elif defined (arch_aarch64)
Expand Down

0 comments on commit f65c72a

Please sign in to comment.