[PATCH] D37960: [mips] Fix relocation record format and ELF header for N32 ABI

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 17 01:48:19 PDT 2017


atanasyan created this revision.
Herald added a subscriber: arichardson.

The N32 ABI uses RELA relocation format, do not use 3-in-1 relocation's encoding, and uses ELFCLASS32. This change passes the `IsN32` flag to the `MCAsmBackend` to distinguish usage of N32 ABI.

We still do not handle some cases like providing the `-target-abi=o32` command line option with the `mips64` target triple. That's why elf_header.s contains some "FIXME" strings. This case will be fixed in a separate patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D37960

Files:
  lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp
  lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h
  lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp
  lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp
  lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h
  test/MC/Mips/cpsetup.s
  test/MC/Mips/elf_header.s
  test/MC/Mips/expansion-j-sym-pic.s
  test/MC/Mips/expansion-jal-sym-pic.s
  test/MC/Mips/reloc-directive.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37960.115568.patch
Type: text/x-patch
Size: 31746 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170917/970cd81a/attachment.bin>


More information about the llvm-commits mailing list