[PATCH] D21292: [mips] Correct ELF format for N32.

Simon Atanasyan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 5 00:32:18 PDT 2019


atanasyan abandoned this revision.
atanasyan added a comment.

Now LLVM/Clang generates correct relocations for N32 ABI:

  $ clang -target mips64 -mabi=n32 -mcpu=mips4 -fpic -fPIC -mabicalls -integrated-as -c main.c -o -| llvm-readobj -r -                
  
  File: <stdin>
  Format: ELF32-mips
  Arch: mips
  AddressSize: 32bit
  LoadName:
  Relocations [
    Section (3) .rela.text {
      0x14 R_MIPS_GPREL16 main 0x0
      0x14 R_MIPS_SUB - 0x0
      0x14 R_MIPS_HI16 - 0x0
      0x1C R_MIPS_GPREL16 main 0x0
      0x1C R_MIPS_SUB - 0x0
      0x1C R_MIPS_LO16 - 0x0
      0x30 R_MIPS_GOT_PAGE .rodata.cst8 0x0
      0x34 R_MIPS_GOT_OFST .rodata.cst8 0x0
      0x44 R_MIPS_GOT_PAGE .rodata.str1.1 0x0
      0x48 R_MIPS_GOT_OFST .rodata.str1.1 0x0
      0x50 R_MIPS_CALL16 printf 0x0
      0x60 R_MIPS_JALR printf 0x0
    }
    Section (7) .rela.pdr {
      0x0 R_MIPS_32 main 0x0
    }
  ]


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D21292/new/

https://reviews.llvm.org/D21292





More information about the llvm-commits mailing list