The ld.so message looks like the following:
error while loading shared libraries: libmozjs.so: unexpected reloc type 0x08
Reloc type 0x08 is R_SPARC_WDISP22
This relocation comes from the ba instruction in the following assembly from methodjit/TrampolineSparc.s:
.type JaegerInterpolineScripted, #function
ld [%l0 + 0x10], %l0 /* Load f->prev_ */
st %l0, [%fp - 36] /* Update f->regs->fp_ */
Replacing ba with call works, but then it goes through the PLT, which is silly.
Another solution that works is to replace JaegerInterpoline with a new label at the same location, but which is not defined as a function.
Created attachment 575633 [details] [diff] [review]
Avoid R_SPARC_WDISP22 relocation in TrampolineSparc.s