系统调用、符号版本与数据结构演进:FreeBSD如何处理兼容性
操作系统在演进过程中经常会碰到一个很现实的问题:一方面,内核和基础系统不可能几十年保持原样,数据结构会变,系统调用会增加,某些早期设计也迟早需要推倒重来;另一方面,一个已经发布出去的ABI又不能想改就改。如果几十年间内核里的数据结构换了一批又一批,这艘船究竟还是不是当年那艘船?保证它在用户态眼里仍然是同一艘船的关键,就在于ABI的稳定性。否则系统每升级一次,过去编译好的程序都有可能需要重新编译,整个生态很快就会变得难以维护。
共4篇文章。
操作系统在演进过程中经常会碰到一个很现实的问题:一方面,内核和基础系统不可能几十年保持原样,数据结构会变,系统调用会增加,某些早期设计也迟早需要推倒重来;另一方面,一个已经发布出去的ABI又不能想改就改。如果几十年间内核里的数据结构换了一批又一批,这艘船究竟还是不是当年那艘船?保证它在用户态眼里仍然是同一艘船的关键,就在于ABI的稳定性。否则系统每升级一次,过去编译好的程序都有可能需要重新编译,整个生态很快就会变得难以维护。
First of all, thanks goes to all people who has helped me on this project, especially Pav (portmgr@) who gave it a twist on pointyhat.
It seems that this has taken me almost a month and 20 commits to get into the tree, after the code is ready. At the beginning, the changeset was ~200KB, and I believe it’s not good to just go ahead and commit it in one time, since it makes reviewing hard. Instead, I manually split it into smaller, functional related chunks, and commit it part-by-part.
前几天忙得晕头转向的……
打算抽时间把libc里面的东西仔细看一看。前一阵发现一个诡异的PHP问题,不知道到底是php的bug还是libc的。。。
ZHAO Xin (a colleague of mine) has pointed out that GNOME Simplified Chinese does not did a good work when displaying time. He then filed ports/72722 and ports/72723.
Adam Weinberger (adamw@, one of the major FreeBSD GNOME maintainers) has then pointed out that it might be better to contact the Simplified Chinese Translation team. In a private mail, I have explained that the root cause of the issue, however, is that our libc implementation does not implemented the GNU Extensions, say, the -_^0 extensions of strftime(3). Adam have then kindly approved that the patches should be committed, and we should have a long-run solution then finally remove them.