# REQUIRES: mips
# Check R_MIPS_GOT16 relocation against merge section.

# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -o %t.o %s
# RUN: ld.lld -shared -o %t.so %t.o
# RUN: llvm-objdump -dD %t.so | FileCheck %s

# CHECK: 000001f1 .rodata:
#                'f''o''o''\0'
# CHECK-NEXT: 1f1: 66 6f 6f 00
# CHECK: lw      $25, -32744($gp)
#                            0x1f1
# CHECK-NEXT: addiu   $4, $25, 497

  .text
  lw     $t9, %got($.str)($gp)
  addiu  $a0, $t9, %lo($.str)

  .section  .rodata.str,"aMS",@progbits,1
$.str:
  .asciz "foo"

# REQUIRES: mips
# Check R_MIPS_GOT16 relocation against merge section.

# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux -o %t.o %s
# RUN: ld.lld -shared -o %t.so %t.o
# RUN: llvm-readobj --symbols --mips-plt-got %t.so | FileCheck %s

# CHECK:      Symbol {
# CHECK:        Name: $.str
# CHECK-NEXT:   Value: 0x1F1
# CHECK:      }

# CHECK:      Local entries [
# CHECK-NEXT:   Entry {
# CHECK-NEXT:     Address:
# CHECK-NEXT:     Access: -32744
# CHECK-NEXT:     Initial: 0x0
# CHECK:        }
# CHECK:      ]

  .text
  lw     $t9, %got($.str)($gp)
  addiu  $a0, $t9, %lo($.str)

  .section  .rodata.str,"aMS",@progbits,1
$.str:
  .asciz "foo"

Revert "[ELF] Update test case due to llvm r365618"
Revert "[ELF] Update test case due to llvm r365618"

Reverting du to reverting r365618

This reverts commit b1e76d1d41c2303f70b53e352bdefbff2a2a9d37.

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@365686 91177308-0d34-0410-b5e6-96231b3b80d8
