Bug 246157
| Summary: | riscv64 llint fails to link with lld | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Nina Kolesa <nina> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Other | ||
| OS: | Linux | ||
Nina Kolesa
When using riscv64 LLint on webkitgtk or WPE 2.38 with clang+lld, linking fails:
ld: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol 'g_opcodeMap'; recompile with -fPIC
(the actual log is much longer, but the same stuff)
This is because the generated assembly uses the lla pseudoinstruction which forces PC-relative addressing but with non-local symbols. The bfd linker somehow eats it, while the lld linker does not. The fix here is to use a GOT lookup (la).
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Nina Kolesa
Pull request: https://github.com/WebKit/WebKit/pull/5086
EWS
Committed 255311@main (3127e0a5094b): <https://commits.webkit.org/255311@main>
Reviewed commits have been landed. Closing PR #5086 and removing active labels.
Radar WebKit Bug Importer
<rdar://problem/100933102>