The ___objc_selrefs_ section is empty after getting the latest version of r2.
I noticed it, because alvarofes script cannot find any xrefs more. This section is crucial for the analysis.
radare2 2.3.0-git 16987 @ darwin-x86-64 git.2.2.0-176-g5402c5938
commit: 5402c5938de925996a43b157994c6e5dfaec02c7 build: 2018-01-09__17:56:32
This problem has been introduced by this commit: https://github.com/radare/radare2/commit/3d8833f47cd930167b3e110ac822421887b6dd96 which detects the S_ZEROFILL flag to zero out the __bss section.
The cause was a wrong comparison with the S_ZEROFILL flag which attributed it to sections which shouldn't be actually zero filled, like the case of __objc_selrefs. The zeroing-out of the section happened because putting phisical size different from virtual size makes the io layer fill the gaps with zeroes, and phisical size 0 means all section is zeroed out.
It has been fixed in this commit by @lowlyw : https://github.com/radare/radare2/commit/7da0d9f3015889c351e1f547db60ac6ba36e8006 which fixes the flag comparison. And now __bss is zeroed out while __objc_selrefs retains its content.
@mrmacete Great explanation and fast fix, thank you!
馃槃 full credit for the fix goes to @lowlyw