summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-readobj/xcoff-basic.test
diff options
context:
space:
mode:
authorDigger Lin <digger.llvm@gmail.com>2019-10-15 20:42:11 +0000
committerDigger Lin <digger.llvm@gmail.com>2019-10-15 20:42:11 +0000
commit34d4bff3d6d7cc521b06679536b0273c00bb0b3b (patch)
tree25c47e9c9bf119c3f5583f3e87501a9ff8a0b899 /llvm/test/tools/llvm-readobj/xcoff-basic.test
parent4f2f9c00b978e45a0bb4c229912359e84ad6af11 (diff)
downloadbcm5719-llvm-34d4bff3d6d7cc521b06679536b0273c00bb0b3b.tar.gz
bcm5719-llvm-34d4bff3d6d7cc521b06679536b0273c00bb0b3b.zip
[XCOFF]implement parsing relocation information for 32-bit xcoff object file
Summary: Parsing the relocation entry information for 32-bit xcoff object file including deal with the relocation overflow. Reviewers: hubert.reinterpretcast, jasonliu, sfertile, xingxue. Subscribers: hiraditya, rupprecht, seiya Differential Revision: https://reviews.llvm.org/D67008 llvm-svn: 374946
Diffstat (limited to 'llvm/test/tools/llvm-readobj/xcoff-basic.test')
-rw-r--r--llvm/test/tools/llvm-readobj/xcoff-basic.test77
1 files changed, 77 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-readobj/xcoff-basic.test b/llvm/test/tools/llvm-readobj/xcoff-basic.test
index 4a6bdd1dbdf..8219f20e53d 100644
--- a/llvm/test/tools/llvm-readobj/xcoff-basic.test
+++ b/llvm/test/tools/llvm-readobj/xcoff-basic.test
@@ -10,6 +10,9 @@
# RUN: llvm-readobj --file-header %p/Inputs/xcoff-basic-neg-sym-count.o | \
# RUN: FileCheck --check-prefix=NEGSYMCOUNT %s
+# RUN: llvm-readobj --relocs --expand-relocs %p/Inputs/xcoff-basic.o | \
+# RUN: FileCheck --check-prefix=RELOCSEXP %s
+
# FILEHEADER: File: {{.*}}xcoff-basic.o
# FILEHEADER-NEXT: Format: aixcoff-rs6000
# FILEHEADER-NEXT: Arch: powerpc
@@ -81,3 +84,77 @@
# xcoff-basic-neg-sym-count.o was stripped using the 'strip' utility, and
# manually edited to have a negative symbol table entry count.
+# RELOCSEXP: File: {{.*}}xcoff-basic.o
+# RELOCSEXP-NEXT: Format: aixcoff-rs6000
+# RELOCSEXP-NEXT: Arch: powerpc
+# RELOCSEXP-NEXT: AddressSize: 32bit
+# RELOCSEXP-NEXT: Relocations [
+# RELOCSEXP-NEXT: Section (index: 1) .text {
+# RELOCSEXP-NEXT: Relocation {
+# RELOCSEXP-NEXT: Virtual Address: 0x2
+# RELOCSEXP-NEXT: Symbol: a (85)
+# RELOCSEXP-NEXT: IsSigned: Yes
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 16
+# RELOCSEXP-NEXT: Type: R_TOC (0x3)
+# RELOCSEXP-NEXT: }
+
+# RELOCSEXP: Virtual Address: 0x90
+# RELOCSEXP-NEXT: Symbol: .__tls_get_addr (118)
+# RELOCSEXP-NEXT: IsSigned: Yes
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 26
+# RELOCSEXP-NEXT: Type: R_RBA (0x18)
+# RELOCSEXP-NEXT: }
+# RELOCSEXP-NEXT: }
+# RELOCSEXP-NEXT: Section (index: 2) .data {
+# RELOCSEXP-NEXT: Relocation {
+# RELOCSEXP-NEXT: Virtual Address: 0x100
+# RELOCSEXP-NEXT: Symbol: A (78)
+# RELOCSEXP-NEXT: IsSigned: No
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 32
+# RELOCSEXP-NEXT: Type: R_POS (0x0)
+# RELOCSEXP-NEXT: }
+
+# RELOCSEXP: Virtual Address: 0x110
+# RELOCSEXP-NEXT: Symbol: J (96)
+# RELOCSEXP-NEXT: IsSigned: No
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 32
+# RELOCSEXP-NEXT: Type: R_POS (0x0)
+# RELOCSEXP-NEXT: }
+
+# RELOCSEXP: Virtual Address: 0x114
+# RELOCSEXP-NEXT: Symbol: j (100)
+# RELOCSEXP-NEXT: IsSigned: No
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 32
+# RELOCSEXP-NEXT: Type: R_TLS (0x20)
+# RELOCSEXP-NEXT: }
+
+# RELOCSEXP: Virtual Address: 0x124
+# RELOCSEXP-NEXT: Symbol: d (111)
+# RELOCSEXP-NEXT: IsSigned: No
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 32
+# RELOCSEXP-NEXT: Type: R_TLSM (0x24)
+# RELOCSEXP-NEXT: }
+
+# RELOCSEXP: Virtual Address: 0x128
+# RELOCSEXP-NEXT: Symbol: (76)
+# RELOCSEXP-NEXT: IsSigned: No
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 32
+# RELOCSEXP-NEXT: Type: R_POS (0x0)
+# RELOCSEXP-NEXT: }
+
+# RELOCSEXP: Virtual Address: 0x154
+# RELOCSEXP-NEXT: Symbol: TOC (72)
+# RELOCSEXP-NEXT: IsSigned: No
+# RELOCSEXP-NEXT: FixupBitValue: 0
+# RELOCSEXP-NEXT: Length: 32
+# RELOCSEXP-NEXT: Type: R_POS (0x0)
+# RELOCSEXP-NEXT: }
+# RELOCSEXP-NEXT: }
+# RELOCSEXP-NEXT:]
OpenPOWER on IntegriCloud