Last Comment Bug 703842 - Binary ends up with a R_SPARC_WDISP22 relocation that ld.so doesn't support
: Binary ends up with a R_SPARC_WDISP22 relocation that ld.so doesn't support
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: Sun Linux
: -- normal (vote)
: mozilla11
Assigned To: Mike Hommey [:glandium]
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-19 00:36 PST by Mike Hommey [:glandium]
Modified: 2012-02-01 13:57 PST (History)
0 users
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Avoid R_SPARC_WDISP22 relocation in TrampolineSparc.s (1.35 KB, patch)
2011-11-19 00:38 PST, Mike Hommey [:glandium]
bhackett1024: review+
Details | Diff | Review

Description Mike Hommey [:glandium] 2011-11-19 00:36:57 PST
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:

.global JaegerInterpolineScripted
.type   JaegerInterpolineScripted, #function
JaegerInterpolineScripted:
    ld      [%l0 + 0x10], %l0                        /* Load f->prev_ */
    st      %l0, [%fp - 36]                          /* Update f->regs->fp_ */
    ba     JaegerInterpoline
    nop

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.
Comment 1 Mike Hommey [:glandium] 2011-11-19 00:38:35 PST
Created attachment 575633 [details] [diff] [review]
Avoid R_SPARC_WDISP22 relocation in TrampolineSparc.s
Comment 3 Ed Morley [:emorley] 2011-12-02 12:06:04 PST
https://hg.mozilla.org/mozilla-central/rev/69791b4d7519

Note You need to log in before you can comment on or make changes to this bug.