[PATCH] D97656: [llvm-objcopy] Initial XCOFF32 support.
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 8 01:48:02 PDT 2021
shchenz added a comment.
Seems the functionality of the llvm-objcopy is not right. Could you please help to check? And maybe we need to add some other tests.
1:
$ llvm-objcopy 32.o copy_nodebug.o
$dump -X32 -tv copy_nodebug.o
copy_nodebug.o:
***Symbol Table Information***
[Index] m Value Scn Aux Sclass Type Name
[Index] a0 Fname
[Index] a1 Tagndx Lnno Size Lnoptr Endndx
[Index] a2 Tagndx Fsiz Lnoptr Endndx
[Index] a3 Tagndx Lnno Size Dimensions
[Index] a4 CSlen PARMhsh SNhash SMtype SMclass Stab SNstab
[Index] a5 SECTlen #RELent #LINnums
[0] m 0x00000000 undef 1 extern errno
[1] a4 0x05e80000 a1f00 8192 US ?? 48 7936
[2] m 0x00000000 undef 1 extern exit
[3] a4 0x1f002000 5f80000 4 ?? PR 536872444 0
[4] m 0x00000000 undef 1 extern atexit
[5] a4 0x0000000e1f002000 1544 ER PR 7936 8192
dump: copy_nodebug.o: dump: 0654-103 Cannot read from the specified file.
[6] m 0x00000000 undef 1 extern **Invalid Symbol Name**
2: (with DWARF info)
$llvm-dwarfdump -a copy_debug.o
Program aborted due to an unhandled Error:
The end of the file was unexpectedly encountered
0. Program arguments: llvm-dwarfdump -a copy.o
IOT/Abort trap (core dumped)
================
Comment at: llvm/include/llvm/Object/XCOFFObjectFile.h:339
int32_t getTimeStamp() const;
+ const XCOFFFileHeader32 *getFileHeader32() const;
----------------
Esme wrote:
> shchenz wrote:
> > I think it should be ok to call `fileHeader32` directly in the Reader?
> `fileHeader32()` is a private member, so I added the public function `getFileHeader32()`.
If so, I think it's better to make the private function public.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97656/new/
https://reviews.llvm.org/D97656
More information about the llvm-commits
mailing list