看板 DFBSD_kernel 關於我們 聯絡資訊
On Thu, Apr 07, 2005 at 02:17:41PM -0700, Matthew Dillon wrote: > The great thing about the compatibility layer idea is that we can > automate the generation of the version A <-> B handling code, and > the optimal 'the versions are the same' case degenerates down into > a direct system call. GCC can't break structures down into > program-accessible data structures (not without a lot of fuss, anyway), > but DICE's C parser can and that means we can automate the generation > of the code which does copies between two different versions of the > same structure. If all that has to be done would be that easy :) You can do most of that already with preprocessor magic, but the real problems are semantic differences, size changes and more. Consider a library accessing struct stat linked against a newer libc. With symbol versioning we can handle that, as long as the library doesn't export stat itself. That's one of the things I'm currently thinking about. Joerg