implement printing out raw section data of xcoff objectfile for llvm-objdump and option -D --disassemble-all option for llvm-objdump
Details
- Reviewers
hubert.reinterpretcast jasonliu sfertile xingxue - Commits
- rGea13683f3d84: The patch is the compiler error specific on the compile error on CMVC
rGb91f798fde42: implement printing out raw section data of xcoff objectfile for llvm-objdump
rG8f8a9f3437d4: implement printing out raw section data of xcoff objectfile for llvm-objdump
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM. A minor suggestion: we could use a test where one of the virtual sections, say .bss is larger then the object file. Similar to X86/elf-disassemble-bss.test.
Hi! This patch seems to be causing test failures on our bots (https://luci-milo.appspot.com/p/fuchsia/builders/ci/clang-linux-x64/b8896419822706045584) and the llvm buildbots (http://lab.llvm.org:8011/builders/clang-cmake-x86_64-avx2-linux/builds/12040/steps/ninja%20check%201/logs/FAIL%3A%20LLVM%3A%3Axcoff-disassemble-all.test). Could you take a look into this? Thanks.
I have fixed the problem.
by adding "; REQUIRES: powerpc-registered-target" into the test case.
llvm/lib/Object/XCOFFObjectFile.cpp | ||
---|---|---|
273 | This also fails on Windows/MSVC with: D:\llvm-project\llvm\lib\Object\XCOFFObjectFile.cpp(273): error C2446: ':': no conversion from 'const llvm::support::ubig32_t' to 'const llvm::support::big64_t' D:\llvm-project\llvm\lib\Object\XCOFFObjectFile.cpp(273): note: No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called D:\llvm-project\llvm\lib\Object\XCOFFObjectFile.cpp(271): error C2789: 'OffsetToRaw': an object of const-qualified type must be initialized D:\llvm-project\llvm\lib\Object\XCOFFObjectFile.cpp(271): note: see declaration of 'OffsetToRaw' Casting both FileOffsetToRawData to uint64_t fixes the problem. |
llvm/lib/Object/XCOFFObjectFile.cpp | ||
---|---|---|
273 | I think this is bug of CMVC compiler, I use gcc to compiler it , it success. if (is64Bit()) OffsetToRaw = toSection64(Sec)->FileOffsetToRawData; else OffsetToRaw = toSection32(Sec)->FileOffsetToRawData; |
This also fails on Windows/MSVC with:
Casting both FileOffsetToRawData to uint64_t fixes the problem.