Check out the new USENIX Web site. next up previous
Next: Extension execution modes Up: DITOOLS Previous: Rebinding and redefinition

Interposition on top of DITOOLS

Figure 2 shows some possible scenarios after rebinding. The upper one (A) depicts how bindings are by default, in which pointers in the reference side make possible to reach definitions residing in another module. The central one (B) shows how changing bindings in the reference side can be used to override definitions in a per-module basis. The lower one (C) shows how to achieve interposition, by changing the binding while providing another one to invoke the previous definition.

Therefore, DITOOLS can be used for interposition of extensions. This requires changing a binding on the reference side to point to the extension, and another one within the extension code to point to the original definition. For example:

(program,read) -> (mymodule,myread)
(mymodule,read) -> (libc,read)

The above lines add `mymodule.myread' as the target for references to `read' being done by the module `program'. References to `read' coming from `mymodule' are conveyed to `libc.read'. Although this last rebinding is unnecessary in the case in which it refers to the conventional definition, we show it for clarity.



Albert Serra, DITools, 2000 USENIX Annual Technical Conference
Tue Apr 25 13:07:07 MET DST 2000