Skip to content

Instantly share code, notes, and snippets.

@ccgus
Created June 30, 2020 16:24
Show Gist options
  • Save ccgus/37ac4afb505d2ad50d071c5cee8a872b to your computer and use it in GitHub Desktop.
Save ccgus/37ac4afb505d2ad50d071c5cee8a872b to your computer and use it in GitHub Desktop.
#import <Foundation/Foundation.h>
#import <dlfcn.h>
// clang main.m -framework Foundation
int main(int argc, const char * argv[]) {
@autoreleasepool {
dlopen("/System/Library/Frameworks/CoreGraphics.framework/Resources/BridgeSupport/CoreGraphics.dylib", RTLD_LAZY);
void *callAddress = dlsym(RTLD_DEFAULT, "CGPointMake");
assert(callAddress);
NSLog(@"CGPoint make found at %p", callAddress);
NSLog(@"All done");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment