Hi Bob,
just a tiny side note from me: When debugging issues, which seem to interfere with the binary layout, I add log messages like follows
/* global vars to prevent optimization */ int dbg_on = true; int dbg_off = false;
if (dbg_off) PDBG("message 1"); if (dbg_on) PDBG("message 2");
and also use CC_OLEVEL=-O0 or CC_OLEVEL=-Og.
Greets