[PATCH] D37960: [mips] Fix relocation record format and ELF header for N32 ABI
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 19 09:03:55 PDT 2017
sdardis added inline comments.
================
Comment at: test/MC/Mips/cpsetup.s:35
# NXX-NEXT: lui $gp, 0
-# N32-NEXT: R_MIPS_HI16/R_MIPS_NONE/R_MIPS_NONE __gnu_local_gp
+# N32-NEXT: R_MIPS_HI16 __gnu_local_gp
# N64-NEXT: R_MIPS_GPREL16/R_MIPS_SUB/R_MIPS_HI16 __cerror
----------------
FIXME: this is actually the expansion of .cpsetup for -mno-shared. N32 in -mshared mode generates the same 3-in-1 relocation sequence as N64.
See my comments on https://reviews.llvm.org/D21131
================
Comment at: test/MC/Mips/elf_header.s:74-76
+# FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips3 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS3 %s
+# FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips4 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS4 %s
+# FIXME: llvm-mc -filetype=obj -triple mips64-unknown-linux -mcpu=mips5 -target-abi=n64 %s -o - | llvm-readobj -h | FileCheck --check-prefixes=ALL,ELF64,BE,N64,NAN1985,MIPS5 %s
----------------
The N64 check prefix for EF_MIPS_PC looks to be spurious here, as llvm-mc is generating non-position independent code as it's an empty file.
I think that portion of the test (line 136) should be dropped and other tests should be put to catalogue how N64 deals with PIC.
Repository:
rL LLVM
https://reviews.llvm.org/D37960
More information about the llvm-commits
mailing list