2018-06-27 00:58:19 +08:00
|
|
|
# REQUIRES: mips
|
2017-01-17 05:17:23 +08:00
|
|
|
# Check order of gp-relative sections, i.e. sections with SHF_MIPS_GPREL flag.
|
|
|
|
|
|
|
|
# RUN: llvm-mc -filetype=obj -triple=mips-unknown-linux %s -o %t.o
|
|
|
|
# RUN: ld.lld %t.o -shared -o %t.so
|
2019-05-01 13:49:01 +08:00
|
|
|
# RUN: llvm-readobj -S %t.so | FileCheck %s
|
2017-01-17 05:17:23 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
nop
|
|
|
|
|
|
|
|
.sdata
|
|
|
|
.word 0
|
|
|
|
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK: Name: .got
|
|
|
|
# CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
# CHECK-NEXT: Flags [
|
|
|
|
# CHECK-NEXT: SHF_ALLOC
|
|
|
|
# CHECK-NEXT: SHF_MIPS_GPREL
|
|
|
|
# CHECK-NEXT: SHF_WRITE
|
|
|
|
# CHECK-NEXT: ]
|
2019-09-07 23:44:40 +08:00
|
|
|
# CHECK-NEXT: Address:
|
|
|
|
# CHECK-NEXT: Offset:
|
2017-01-17 05:17:23 +08:00
|
|
|
# CHECK: }
|
|
|
|
# CHECK: Section {
|
|
|
|
# CHECK-NEXT: Index:
|
|
|
|
# CHECK-NEXT: Name: .sdata
|
|
|
|
# CHECK-NEXT: Type: SHT_PROGBITS
|
|
|
|
# CHECK-NEXT: Flags [
|
|
|
|
# CHECK-NEXT: SHF_ALLOC
|
|
|
|
# CHECK-NEXT: SHF_MIPS_GPREL
|
|
|
|
# CHECK-NEXT: SHF_WRITE
|
|
|
|
# CHECK-NEXT: ]
|
2019-09-07 23:44:40 +08:00
|
|
|
# CHECK-NEXT: Address:
|
|
|
|
# CHECK-NEXT: Offset:
|
2017-01-17 05:17:23 +08:00
|
|
|
# CHECK: }
|