2018-06-27 00:58:19 +08:00
|
|
|
# REQUIRES: mips
|
2016-02-26 00:19:15 +08:00
|
|
|
# Check assigning STO_MIPS_PLT flag to symbol needs a pointer equality.
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux \
|
|
|
|
# RUN: %S/Inputs/mips-dynamic.s -o %t.so.o
|
|
|
|
# RUN: ld.lld %t.so.o -shared -o %t.so
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o %t.so -o %t.exe
|
2019-10-03 20:08:04 +08:00
|
|
|
# RUN: llvm-readobj --dyn-syms -A %t.exe | FileCheck %s
|
2016-02-26 00:19:15 +08:00
|
|
|
|
|
|
|
# CHECK: Symbol {
|
2019-01-08 18:50:59 +08:00
|
|
|
# CHECK: Name: foo0
|
2018-06-16 02:15:26 +08:00
|
|
|
# CHECK-NEXT: Value: 0x0
|
2016-02-26 00:19:15 +08:00
|
|
|
# CHECK-NEXT: Size: 0
|
|
|
|
# CHECK-NEXT: Binding: Global
|
|
|
|
# CHECK-NEXT: Type: Function
|
2018-06-16 02:15:26 +08:00
|
|
|
# CHECK-NEXT: Other: 0
|
2016-02-26 00:19:15 +08:00
|
|
|
# CHECK-NEXT: Section: Undefined
|
|
|
|
# CHECK-NEXT: }
|
2018-06-16 02:15:26 +08:00
|
|
|
# CHECK-NEXT: Symbol {
|
2019-01-08 18:50:59 +08:00
|
|
|
# CHECK-NEXT: Name: foo1
|
2018-06-16 02:15:26 +08:00
|
|
|
# CHECK-NEXT: Value: 0x[[FOO1:[0-9A-F]+]]
|
2016-02-26 00:19:15 +08:00
|
|
|
# CHECK-NEXT: Size: 0
|
|
|
|
# CHECK-NEXT: Binding: Global
|
|
|
|
# CHECK-NEXT: Type: Function
|
2018-06-16 02:15:26 +08:00
|
|
|
# CHECK-NEXT: Other [ (0x8)
|
|
|
|
# CHECK-NEXT: STO_MIPS_PLT
|
|
|
|
# CHECK-NEXT: ]
|
2016-02-26 00:19:15 +08:00
|
|
|
# CHECK-NEXT: Section: Undefined
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
|
|
|
|
# CHECK: Primary GOT {
|
|
|
|
# CHECK: Local entries [
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK-NEXT: Global entries [
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
# CHECK: PLT GOT {
|
|
|
|
# CHECK: Entries [
|
|
|
|
# CHECK-NEXT: Entry {
|
|
|
|
# CHECK-NEXT: Address:
|
|
|
|
# CHECK-NEXT: Initial:
|
|
|
|
# CHECK-NEXT: Value: 0x0
|
|
|
|
# CHECK-NEXT: Type: Function
|
|
|
|
# CHECK-NEXT: Section: Undefined
|
|
|
|
# CHECK-NEXT: Name: foo0
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: Entry {
|
|
|
|
# CHECK-NEXT: Address:
|
|
|
|
# CHECK-NEXT: Initial:
|
2018-06-11 15:24:31 +08:00
|
|
|
# CHECK-NEXT: Value: 0x[[FOO1]]
|
2016-02-26 00:19:15 +08:00
|
|
|
# CHECK-NEXT: Type: Function
|
|
|
|
# CHECK-NEXT: Section: Undefined
|
|
|
|
# CHECK-NEXT: Name: foo1
|
|
|
|
# CHECK-NEXT: }
|
|
|
|
# CHECK-NEXT: ]
|
|
|
|
|
|
|
|
.text
|
|
|
|
.globl __start
|
|
|
|
__start:
|
|
|
|
jal foo0 # R_MIPS_26 against 'foo0' from DSO
|
|
|
|
lui $t0,%hi(foo1) # R_MIPS_HI16/LO16 against 'foo1' from DSO
|
|
|
|
addi $t0,$t0,%lo(foo1)
|
|
|
|
|
|
|
|
loc:
|
|
|
|
nop
|