4 ms·
Cool investigation into the guts of macOS. I had no idea symbols were still present for production builds in macOS and that they are so easily 'hackable'. I ha
by dlivingston 2y ago
Cool investigation into the guts of macOS. I had no idea symbols were still present for production builds in macOS and that they are so easily 'hackable'.
I hadn't noticed before, but it is very strange to round corners of images in QuickLook. Apple should revert this change.
- saagarjha 2y agoApple provides basic symbols for some of their binaries–particularly older ones. I assume the default setting used to be to not strip those, or some kind soul picked that option and nobody revisited it. Unfortunately a lot of new code is shipped stripped by default :(
- fiddlerwoaroof 2y agoYou can’t really strip objective-c symbols, can you? I think that would break method dispatch
- saagarjha 2y agoYou can definitely strip the symbols; the runtime metadata is stored separately.
- TazeTSchnitzel 2y agoYes but what Objective-C people consider “no symbols” looks like symbols to C programmers.
- saagarjha 2y agoTell that to ___lldb_unnamed_symbol74$$TextEdit
- LeoNatan25 2y agoYes, but you can often still figure out what the name is if you pause in that method and print _cmd ($arg2), or look at the calling stack entry and see what selector string was used.
- saagarjha 2y agoPersonally I just use a disassembler that parses this metadata for me
- deleted 2y ago[deleted]
- mitemte 2y agoYou might be thinking of Objective-C metadata, which contains information about classes, protocols and categories. Unlike symbols, metadata can’t be stripped.
- fiddlerwoaroof 2y agoI’m specifically talking about selectors and things like class names, etc. I can see that you can strip the parts of objective-c that are just C.
- LoganDark 2y agoThe selector system is enough even without debug symbols, since all object method calls are identified at runtime by a human readable string.
- saagarjha 2y agoFun fact selectors do not have to be human-readable
- LoganDark 2y agoSymbols don't have to be human readable either. You can easily write completely inscrutible function names in source code. I don't see how this point really matters. Sure you can name your functions and selectors stupidly all the same. There are also probably obfuscators for it (Proguard-like?). But that's not really relevant to my point.