Skip to content

Commit

Permalink
Add dylib values to rebinding example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
kastiglione authored and Dave Lee committed Jan 25, 2017
1 parent 27875e2 commit e7f34c0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ int my_open(const char *path, int oflag, ...) {
int main(int argc, char * argv[])
{
@autoreleasepool {
rebind_symbols((struct rebinding[2]){{"close", my_close, (void *)&orig_close}, {"open", my_open, (void *)&orig_open}}, 2);
rebind_symbols((struct rebinding[2]){
{"close", "/usr/lib/libSystem.B.dylib", my_close, (void *)&orig_close},
{"open", "/usr/lib/libSystem.B.dylib", my_open, (void *)&orig_open}
}, 2);

// Open our own binary and print out first 4 bytes (which is the same
// for all Mach-O binaries on a given architecture)
Expand Down

0 comments on commit e7f34c0

Please sign in to comment.