Maybe the trick is to just start going over all structs in libosmocore and upwards, and see if the problem disappears on big-endian architectures. I can start on it, when I find some time for it.
I've started here: https://salsa.debian.org/debian-mobcom-team/libosmocore/blob/master/debian/p...
(to prevent duplicated work)
Ruben