Re:DIY: kernel panic OS X and iOS in 10 LOC
by ttflee on Saturday February 21, 2015 @07:56AM
(#9085406)
But clang did not treat it as an error when I commented the #include line. I have no idea if it was actually dynamically linked.
[ Parent
| on HN ]
Re:DIY: kernel panic OS X and iOS in 10 LOC
by _wmd on Saturday February 21, 2015 @08:31AM
(#9085451)
Includes don't control linking, and traditional C did not require function prototypes, so most compilers (in non-C++ mode at least) will happily compile calls to unknown functions, it just assumes a default signature.
Re:DIY: kernel panic OS X and iOS in 10 LOC
by ttflee on Saturday February 21, 2015 @09:47AM
(#9085638)
I know that and mach_* are supposed to be dynamically loaded. But what I failed to get is to reproduce the kernel panic, not to build and run on my iPhone 5. By now that piece of code could run but only result in normal crash, not kernel panic.