macho/research/custom_loader/a.mm
nganhkhoa 3aaa85520e add fix for objc binaries
TODO: Fix call to +load() for non-lazy class
2023-06-15 10:46:10 +07:00

32 lines
420 B
Plaintext

#import <Foundation/Foundation.h>
@interface Foo : NSObject
@end
@implementation Foo
- (void)bar {
NSLog(@"%@", self);
}
@end
@interface Bar : NSObject
@end
@implementation Bar
+ (void)load {
NSLog(@"%@", self);
}
@end
@implementation Baz : Bar
@end
int main(int argc, const char * argv[]) {
@autoreleasepool {
NSLog(@"Hello, World!");
Foo *foo = [[Foo alloc] init];
[foo bar];
}
return 0;
}