summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonard Chan <leonardchan@google.com>2019-11-18 20:05:57 -0800
committerLeonard Chan <leonardchan@google.com>2019-11-18 20:05:57 -0800
commit66b6b92765213a6bde96aea7a393621426027543 (patch)
tree41a638479dbca476ceece110be256de129e8f269
parent45f8ee5f3c5ad4bc0b041c49a251d674c14dbc13 (diff)
downloadbcm5719-llvm-66b6b92765213a6bde96aea7a393621426027543.tar.gz
bcm5719-llvm-66b6b92765213a6bde96aea7a393621426027543.zip
Revert "implement printing out raw section data of xcoff objectfile for llvm-objdump"
This reverts commit 8f8a9f3437d4517f674395da30edb59d5514f7bc. Reverting since this patch seems to break a lot of llvm buildbots.
-rw-r--r--llvm/lib/Object/XCOFFObjectFile.cpp25
-rw-r--r--llvm/test/tools/llvm-objdump/xcoff-disassemble-all.test55
-rw-r--r--llvm/test/tools/llvm-objdump/xcoff-raw-section-data.test35
3 files changed, 8 insertions, 107 deletions
diff --git a/llvm/lib/Object/XCOFFObjectFile.cpp b/llvm/lib/Object/XCOFFObjectFile.cpp
index 6cc8deca73b..5ca2a6a03f0 100644
--- a/llvm/lib/Object/XCOFFObjectFile.cpp
+++ b/llvm/lib/Object/XCOFFObjectFile.cpp
@@ -191,8 +191,9 @@ Expected<StringRef> XCOFFObjectFile::getSymbolName(DataRefImpl Symb) const {
}
Expected<uint64_t> XCOFFObjectFile::getSymbolAddress(DataRefImpl Symb) const {
- assert(!is64Bit() && "Symbol table support not implemented for 64-bit.");
- return toSymbolEntry(Symb)->Value;
+ uint64_t Result = 0;
+ llvm_unreachable("Not yet implemented!");
+ return Result;
}
uint64_t XCOFFObjectFile::getSymbolValueImpl(DataRefImpl Symb) const {
@@ -265,19 +266,7 @@ uint64_t XCOFFObjectFile::getSectionSize(DataRefImpl Sec) const {
Expected<ArrayRef<uint8_t>>
XCOFFObjectFile::getSectionContents(DataRefImpl Sec) const {
- if (isSectionVirtual(Sec))
- return ArrayRef<uint8_t>();
-
- const uint64_t OffsetToRaw = is64Bit()
- ? toSection64(Sec)->FileOffsetToRawData
- : toSection32(Sec)->FileOffsetToRawData;
-
- const uint8_t * ContentStart = base() + OffsetToRaw;
- uint64_t SectionSize = getSectionSize(Sec);
- if (checkOffset(Data, uintptr_t(ContentStart), SectionSize))
- return make_error<BinaryError>();
-
- return makeArrayRef(ContentStart,SectionSize);
+ llvm_unreachable("Not yet implemented!");
}
uint64_t XCOFFObjectFile::getSectionAlignment(DataRefImpl Sec) const {
@@ -307,8 +296,9 @@ bool XCOFFObjectFile::isSectionBSS(DataRefImpl Sec) const {
}
bool XCOFFObjectFile::isSectionVirtual(DataRefImpl Sec) const {
- return is64Bit() ? toSection64(Sec)->FileOffsetToRawData == 0
- : toSection32(Sec)->FileOffsetToRawData == 0;
+ bool Result = false;
+ llvm_unreachable("Not yet implemented!");
+ return Result;
}
relocation_iterator XCOFFObjectFile::section_rel_begin(DataRefImpl Sec) const {
@@ -394,6 +384,7 @@ Triple::ArchType XCOFFObjectFile::getArch() const {
}
SubtargetFeatures XCOFFObjectFile::getFeatures() const {
+ llvm_unreachable("Not yet implemented!");
return SubtargetFeatures();
}
diff --git a/llvm/test/tools/llvm-objdump/xcoff-disassemble-all.test b/llvm/test/tools/llvm-objdump/xcoff-disassemble-all.test
deleted file mode 100644
index 84d5811677a..00000000000
--- a/llvm/test/tools/llvm-objdump/xcoff-disassemble-all.test
+++ /dev/null
@@ -1,55 +0,0 @@
-# RUN: llvm-objdump -D %p/Inputs/xcoff-section-headers.o | \
-# RUN: FileCheck %s
-
-# xcoff-section-headers.o Compiled with IBM XL C/C++ for AIX, V16.1.0
-# compiler command: xlc -qtls -o xcoff-section-headers.o -c test.c
-# test.c:
-# int a;
-# int b = 12345;
-# __thread int c;
-# __thread double d = 3.14159;
-#
-# int func(void) {
-# return a;
-# }
-
-CHECK: Inputs/xcoff-section-headers.o: file format aixcoff-rs6000
-CHECK: Disassembly of section .text:
-CHECK: 00000000 .text:
-CHECK-NEXT: 0: 80 62 00 04 lwz 3, 4(2)
-CHECK-NEXT: 4: 80 63 00 00 lwz 3, 0(3)
-CHECK-NEXT: 8: 4e 80 00 20 blr
-CHECK-NEXT: c: 00 00 00 00 <unknown>
-CHECK-NEXT: 10: 00 00 20 40 <unknown>
-CHECK-NEXT: 14: 00 00 00 01 <unknown>
-CHECK-NEXT: 18: 00 00 00 0c <unknown>
-CHECK-NEXT: 1c: 00 04 66 75 <unknown>
-CHECK-NEXT: 20: 6e 63 00 00 xoris 3, 19, 0
-CHECK-NEXT: ...
-CHECK: Disassembly of section .data:
-CHECK: 00000080 func:
-CHECK-NEXT: 80: 00 00 00 94 <unknown>
-CHECK: 00000084 a:
-CHECK-NEXT: 84: 00 00 00 a4 <unknown>
-CHECK: 00000088 b:
-CHECK-NEXT: 88: 00 00 00 a0 <unknown>
-CHECK: 0000008c c:
-CHECK-NEXT: 8c: 00 00 00 08 <unknown>
-CHECK: 00000090 d:
-CHECK-NEXT: 90: 00 00 00 00 <unknown>
-CHECK: 00000094 func:
-CHECK-NEXT: 94: 00 00 00 00 <unknown>
-CHECK-NEXT: 98: 00 00 00 80 <unknown>
-CHECK-NEXT: 9c: 00 00 00 00 <unknown>
-CHECK: 000000a0 b:
-CHECK-NEXT: a0: 00 00 30 39 <unknown>
-CHECK: Disassembly of section .bss:
-CHECK: 000000a4 a:
-CHECK-NEXT: ...
-CHECK: Disassembly of section .tdata:
-CHECK: 00000000 d:
-CHECK-NEXT: 0: 40 09 21 f9 bdnzfl 9, .+8696
-CHECK-NEXT: 4: f0 1b 86 6e <unknown>
-CHECK: Disassembly of section .tbss:
-CHECK: 00000008 c:
-CHECK-NEXT: ...
diff --git a/llvm/test/tools/llvm-objdump/xcoff-raw-section-data.test b/llvm/test/tools/llvm-objdump/xcoff-raw-section-data.test
deleted file mode 100644
index 12469446b2d..00000000000
--- a/llvm/test/tools/llvm-objdump/xcoff-raw-section-data.test
+++ /dev/null
@@ -1,35 +0,0 @@
-# RUN: llvm-objdump --full-contents %p/Inputs/xcoff-section-headers.o | \
-# RUN: FileCheck %s
-
-# CHECK: Inputs/xcoff-section-headers.o: file format aixcoff-rs6000
-# CHECK: Contents of section .text:
-# CHECK-NEXT: 0000 80620004 80630000 4e800020 00000000 .b...c..N.. ....
-# CHECK-NEXT: 0010 00002040 00000001 0000000c 00046675 .. @..........fu
-# CHECK-NEXT: 0020 6e630000 00000000 00000000 00000000 nc..............
-# CHECK-NEXT: 0030 00000000 00000000 00000000 00000000 ................
-# CHECK-NEXT: 0040 00000000 00000000 00000000 00000000 ................
-# CHECK-NEXT: 0050 00000000 00000000 00000000 00000000 ................
-# CHECK-NEXT: 0060 00000000 00000000 00000000 00000000 ................
-# CHECK-NEXT: 0070 00000000 00000000 00000000 00000000 ................
-# CHECK-NEXT: Contents of section .data:
-# CHECK-NEXT: 0080 00000094 000000a4 000000a0 00000008 ................
-# CHECK-NEXT: 0090 00000000 00000000 00000080 00000000 ................
-# CHECK-NEXT: 00a0 00003039 ..09
-# CHECK-NEXT: Contents of section .bss:
-# CHECK-NEXT: <skipping contents of bss section at [00a4, 00a8)>
-# CHECK-NEXT: Contents of section .tdata:
-# CHECK-NEXT: 0000 400921f9 f01b866e @.!....n
-# CHECK-NEXT: Contents of section .tbss:
-# CHECK-NEXT: <skipping contents of bss section at [0008, 000c)>
-
-# xcoff-section-headers.o Compiled with IBM XL C/C++ for AIX, V16.1.0
-# compiler command: xlc -qtls -o xcoff-section-headers.o -c test.c
-# test.c:
-# int a;
-# int b = 12345;
-# __thread int c;
-# __thread double d = 3.14159;
-#
-# int func(void) {
-# return a;
-# }
OpenPOWER on IntegriCloud