Or just use big-endian order for numbers.
Over in JavaScript-land there is a concept of “source maps” where you indicate the source location of the “high-level” non-mangled code, based on the equivalent location of the “low-level” mangled code. Source maps are not included in the mangled code that is delivered to browsers, for obvious reasons. Would a similar concept help?