[PATCH] D70201: [mips] Do not emit R_MIPS_JALR for sym+offset in case of O32 ABI

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 13 12:26:11 PST 2019


atanasyan created this revision.
atanasyan added reviewers: Petar.Avramovic, mstojanovic, mbrkusanin.
Herald added subscribers: jrtc27, hiraditya, arichardson, sdardis.
Herald added a project: LLVM.

O32 ABI uses relocations in REL format. Relocation's addend is written in place. R_MIPS_JALR relocation points to the `jalr` instruction which does not have a place to store the relocation addend. So it's impossible to save non-zero "offset". This patch blocks emission of `R_MIPS_JALR` relocations in such cases.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70201

Files:
  llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp
  llvm/test/MC/Mips/expansion-jal-sym-pic.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70201.229152.patch
Type: text/x-patch
Size: 20619 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191113/804b2f5a/attachment.bin>


More information about the llvm-commits mailing list