4 ms·
In my opinion, with every change in ABI, the build system should transparently update all binaries. The only thing the developer should notice is that the build
by amelius 10y ago
In my opinion, with every change in ABI, the build system should transparently update all binaries. The only thing the developer should notice is that the build takes longer.
- JoshTriplett 10y agoDebian has automation to do exactly that: when a library changes ABI, but has the same source API, such that a rebuild will suffice to migrate to the new version, they can trigger a rebuild of every package that build-depends on the library -dev package. (That automation works for other kinds of rebuild-only migrations, too, such as rebuilding packages with a new version of a build tool that fixes some bug in the resulting built packages.)
- dingo_bat 10y agoFor that, shouldn't the build system know how to build each library (i.e. it should have sources and makefiles)?
- tremon 10y agoThat means the build system has access to all source code of all binaries compiled against it. That is doable within projects (make dependencies), and within centralized open-source distributions such as Debian (through archive rebuild triggers). But it is impossible in general.
- jschwartzi 10y agoWouldn't there be idioms in the assembly which represent compatibility with the old ABI? Couldn't you translate those directly in the assembly without having to re-run the compilation? ABI describes things like how the stack works, but at the assembly level the only stack is the one you implement, which is generally compatible with an ABI version.
- tremon 10y agoNot easily. What you are describing is annotating every entry point in a library with symbol tags, and annotating every function call with the same symbols. It basically requires you to have another JIT compilation phase or runtime library to resolve function calls. We do have examples of that (e.g. .net assemblies), but it requires a lot of infrastructure to support it. And there's still more than one stack implementation choice at the assembly level. For example, what is the correct order for passing parameters on the stack? What is the memory alignment for off-size stack parameters? Is the caller or the callee responsible for reclaiming the stack space at function completion? How are function return values passed back?