Hi, I am investigating the arm-specific problem https://bugs.openjdk.java.net/browse/JDK-8283326. It looks like the error is caused by arm- and thumb-code interleaving: GCC-compiled code, in thumb mode, calls into a static assembler subroutine that has been compiled into arm mode, but the caller uses the wrong call instruction and we call into SafeFetch without switching into arm mode (gcc-generated code uses bl instead of blx).
This problem only happens if the OpenJDK was built with a GCC that itself was built with --with-mode=thumb. Without that option, GCC defaults to arm code generation, and that hides the error I describe above. My question is: Is this by design? It seems strange to leave this decision up to whoever built the toolchain. Should we not fix the arm/thumb decision at build time with either one of -mthumb or -marm? Thanks, Thomas P.S. I found one possible solution for my particular problem was to add `.type function` to the static assembler routine. That caused gcc to use the correct jump instruction (blx instead of bl). But I am not sure this is the best solution, maybe best would be to just use the same mode for all hotspot compilation units.