[PATCH] D70255: implement printing out raw section data of xcoff objectfile for llvm-objdump
Digger via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 19 16:41:36 PST 2019
DiggerLin marked an inline comment as done.
DiggerLin added inline comments.
================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:273
+ ? toSection64(Sec)->FileOffsetToRawData
+ : toSection32(Sec)->FileOffsetToRawData;
+
----------------
aganea wrote:
> 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.
I think this is bug of CMVC compiler, I use gcc to compiler it , it success.
I have changed the code to
if (is64Bit())
OffsetToRaw = toSection64(Sec)->FileOffsetToRawData;
else
OffsetToRaw = toSection32(Sec)->FileOffsetToRawData;
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70255/new/
https://reviews.llvm.org/D70255
More information about the llvm-commits
mailing list