42 lines
647 B
Plaintext
42 lines
647 B
Plaintext
#import <Foundation/Foundation.h>
|
|
#include <stdio.h>
|
|
|
|
@interface Foo : NSObject
|
|
@end
|
|
|
|
@implementation Foo
|
|
- (void)bar {
|
|
NSLog(@"%@", self);
|
|
}
|
|
@end
|
|
|
|
@interface Bar : NSObject
|
|
@end
|
|
|
|
@implementation Bar
|
|
+ (void)load {
|
|
NSLog(@"%@", self);
|
|
printf("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n");
|
|
}
|
|
@end
|
|
|
|
// @implementation Baz : Bar
|
|
// @end
|
|
|
|
|
|
|
|
__attribute__((constructor)) static void
|
|
hmmge() {
|
|
// create a dummy blank function to be replaced to call OBJC load
|
|
printf("hmmge\n");
|
|
}
|
|
|
|
int main(int argc, const char * argv[]) {
|
|
@autoreleasepool {
|
|
NSLog(@"Hello, World!");
|
|
Foo *foo = [[Foo alloc] init];
|
|
[foo bar];
|
|
}
|
|
return 0;
|
|
}
|