The ABI record

A module does not call the library across a stable interface; it reads bundle structure using offsets compiled into it. So a module built against a different configuration of the library — other context sizes, another set of optional types, a debug build that wraps the bundle pointer — does not fail to find a function; it reads the wrong bytes. OSE_ABI_DECLARE stamps the values a module was compiled with into an exported record, and the loader compares them with its own before handing over a bundle. A mismatch is refused with the field named:

ose: o.se.maxstub.so was built against a different libose
(wrapped_bundle: module expects 0, this build has 1). Rebuild it.

A module with no record at all is refused too, since it cannot be told apart from an incompatible one. The rule that follows: build a module against the library of the host that will load it, in the same configuration, and add to OSE_ABI_FIELDS whenever a change to the library changes bundle layout.


Modules · The library · C reference