N_FUNC_COLD is a new MachO symbol attribute. It's a hint to the linker
to order a symbol towards the end of its section, to improve locality.
Example:
void a1() {}
__attribute__((cold)) void a2() {}
void a3() {}
int main() {
a1();
a2();
a3();
return 0;
}A linker that supports N_FUNC_COLD will order _a2 to the end of the text
section. From nm -njU output, we see:
_a1 _a3 _main _a2
This (and the previous bits too) overlap with the ordinal written by http://llvm-cs.pcc.me.uk/include/llvm/BinaryFormat/MachO.h/rSET_LIBRARY_ORDINAL
I suppose the thinking is that that's safe because the ordinal is only set on undefs while these 3 bits here can't be set on undefs? If so, maybe this warrants a comment?