ZoomMultistompZDL

TI PDF Notes for ZDL Work

Source PDFs:

This is a practical extraction, not a replacement for the manuals. It records the parts that explain current linker/DSP rules.

Calling Convention

From sprab89b, Section 3:

ZDL consequence: C functions compiled by TI will respect this ABI, but handwritten or cloned handler code must preserve callee-saved registers and return through B3. Any code that assumes B14 points at our data is unsafe unless we set it ourselves, and we currently do not.

Data Addressing and B14

From sprui04g, Section 8.1.4:

ZDL consequence: always compile plugin DSP C with --mem_model:data=far. Reject R_C6000_SBR_* object relocations from plugin .audio code, because those are DP/B14-relative forms. The Zoom host does not set B14 for our module before calling .audio.

Sections and Zero Fill

From sprui03f, Section 2, and sprui04g, Sections 6/8:

ZDL consequence: avoid .bss, .usect, common symbols, and uninitialized static storage. Our ZDL loader path is not a normal C runtime startup. Use small initialized data only, and keep writable .fardata small with memsz == filesz.

From sprui04g, Section 8.9:

ZDL consequence: a plugin audio callback should not rely on C runtime startup unless we implement or prove equivalent loader behavior. This rules out ordinary .bss/.far state, .cinit tables, constructors, and heap-based state for release builds.

Runtime Helper Functions

From sprui04g, Section 8.8:

The compiler inserts __c6xabi_* RTS helper calls for operations the instruction set does not directly cover. Examples include:

From sprab89b, helper-function API:

ZDL consequence: inspect external symbols after every build. __c6xabi_divf is currently bundled by this repo. Other helpers are not automatically safe. Avoid double, integer division, modulo, long long, implicit conversions, and high --opt_for_space unless the exact helper is bundled and tested. Consider --disable_push_pop if a build starts emitting push/pop RTS helpers.

Relocations

From sprab89b, Section 13.5:

ZDL consequence: ABS* and known PCR_S21 relocations are expected. SBR, GOT, DSBT, TLS, exception, or C++ relocations should be treated as a build failure for custom DSP objects unless the linker explicitly supports them and hardware testing proves them safe.

Dynamic Linking and Visibility

From sprab89b, Sections 6/14:

ZDL consequence: our linker is deliberately narrow. It emits the symbols the Zoom loader needs, keeps most local symbols hidden/protected, and avoids DSBT machinery. Do not introduce normal shared-library assumptions such as GOT, PLT, imported data, or C++ runtime features.

Compact Instructions and Attributes

From sprab89b, Sections 13/17:

ZDL consequence: preserve the bundled attribute/section-flag blobs in the linker output. Firmware disassembly also needs these to decode compact instructions accurately.