I'm unsure how to interpret this
Google for "MIPS sdc1" shows that this is a floating-point "Store Doubleword from Coprocessor-1" instruction.
A guess: your embedded system doesn't have a floating-point co-processor?
You would likely need to add
-msoft-float to your
xgo command and rebuild.
it is crashing on the same
sdc1call, the registers are the same
Yes, but is in the same function (
__sigsetjmp_aux), or in some different one?
Here is the call I'm building with xgo:
xgo --go=1.12 --targets=linux/mips --ldflags '-extldflags "-static -msoft-float"' ~/path/to/project
It looks like the routine
__sigsetjmp_aux is coming from GLIBC, which is not built by
And the version of GLIBC you are using was built without
-msoft-float, so you are still linking in the code that expects hardware floating point, that your system lacks.
Step 1: verify where
__sigsetjmp_aux is coming from. To do so, you need to pass
-y __sigsetjmp_aux to the linker. Maybe
--ldflags '-extldflags "-static -msoft-float -Wl,-y,__sigsetjmp_aux"' will do that.
You should see something similar to this:
gcc t.o -Wl,-y,setjmp -static t.o: reference to setjmp /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libc.a(bsd-setjmp.o): definition of setjmp
Assuming your definition of
__sigsetjmp_aux does come from
libc.a, you'll need to rebuild it with
-msoft-float to the linker is wrong and will have no effect -- it's a compiler flag.