diff options
author | Rui Ueyama <ruiu@google.com> | 2015-02-19 04:02:17 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2015-02-19 04:02:17 +0000 |
commit | 3e6490f1e8290c2f1744a923badaa2f362c55d07 (patch) | |
tree | c162847ce88b3dea143c42f70ab30f890dd4e12f | |
parent | 91f2e3c9c2650795d95c80a7f922054ca74c1ac5 (diff) | |
download | bcm5719-llvm-3e6490f1e8290c2f1744a923badaa2f362c55d07.tar.gz bcm5719-llvm-3e6490f1e8290c2f1744a923badaa2f362c55d07.zip |
PECOFF: use llvm-readobj to dump .reloc section
When this test was written, no llvm tool could print out contents
of base relocation section. Now llvm-readobj is able to dump it in
a text format. Use that tool to make this test readable.
llvm-svn: 229814
-rw-r--r-- | lld/test/pecoff/base-reloc.test | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/lld/test/pecoff/base-reloc.test b/lld/test/pecoff/base-reloc.test index 8b2246f9125..1d1fde711de 100644 --- a/lld/test/pecoff/base-reloc.test +++ b/lld/test/pecoff/base-reloc.test @@ -2,22 +2,25 @@ # # RUN: lld -flavor link /out:%t1.exe /subsystem:console /force /opt:noref \ # RUN: -- %t.obj -# RUN: llvm-objdump -s %t1.exe | FileCheck %s --check-prefix=BASEREL-SECTION +# RUN: llvm-readobj -coff-basereloc %t1.exe | FileCheck %s --check-prefix=BASEREL # # RUN: lld -flavor link /out:%t2.exe /subsystem:console /force /fixed \ # RUN: /opt:noref -- %t.obj -# RUN: llvm-objdump -s %t2.exe | FileCheck %s --check-prefix=NOBASEREL-SECTION +# RUN: llvm-readobj -coff-basereloc %t2.exe | FileCheck %s --check-prefix=NOBASEREL -# Because llvm-objdump cannot pretty-print the contents of .reloc section, we -# have no choice other than comparing the result with this binary blob. -# -# TODO: Improve llvm-objdump to pretty print .reloc section as GNU binutil -# objdump does. - -BASEREL-SECTION: Contents of section .reloc: -BASEREL-SECTION-NEXT: 3000 00200000 0c000000 07300c30 +BASEREL: BaseReloc [ +BASEREL-NEXT: Entry { +BASEREL-NEXT: Type: HIGHLOW +BASEREL-NEXT: Address: 0x2007 +BASEREL-NEXT: } +BASEREL-NEXT: Entry { +BASEREL-NEXT: Type: HIGHLOW +BASEREL-NEXT: Address: 0x200C +BASEREL-NEXT: } +BASEREL-NEXT: ] -NOBASEREL-SECTION-NOT: Contents of section .reloc: +NOBASEREL: BaseReloc [ +NOBASEREL-NEXT: ] # RUN: lld -flavor link /out:%t3.exe /subsystem:console /force /opt:noref \ # RUN: -- %t.obj |