[AIX] Support of Big archive (read)
authorzhijian <zhijian@ca.ibm.com>
Mon, 17 Jan 2022 15:37:08 +0000 (10:37 -0500)
committerzhijian <zhijian@ca.ibm.com>
Mon, 17 Jan 2022 16:59:54 +0000 (11:59 -0500)
commit2164c54315bb3351a5e22336c12b1eeb2bbf6821
tree90e2233b17df07873464511c06ce25a99e5cdb1b
parent76f1c396fad8b9281a1c96d266af357da0492344
[AIX] Support of Big archive (read)

Summary:

The patch is based on the EGuesnet's implement of the "Support of Big archive (read)
the first commit of the patch is come from https://reviews.llvm.org/D100651.

the rest of commits of the patch

1  Addressed the comments on the https://reviews.llvm.org/D100651
2  according to https://www.ibm.com/docs/en/aix/7.2?topic=formats-ar-file-format-big
using the "fl_fstmoff" for the first object file number, using "char ar_nxtmem[20]" to get next object file ,
using the "char fl_lstmoff[20]" for the last of the object file will fix the following problems:
   2.1 can not correct reading a archive files which has padding data between too object file
   2.2 can not correct reading a archive files from which some object file has be deleted

3 introduce a new derived class BigArchive for big ar file.

Reviewers: James Henderson
Differential Revision: https://reviews.llvm.org/D111889
llvm/include/llvm/Object/Archive.h
llvm/lib/Object/Archive.cpp
llvm/lib/Object/ArchiveWriter.cpp
llvm/test/Object/Inputs/aix-big-archive.a [new file with mode: 0644]
llvm/test/Object/archive-big-extract.test [new file with mode: 0644]
llvm/test/Object/archive-big-print.test [new file with mode: 0644]
llvm/test/Object/archive-big-read.test [new file with mode: 0644]
llvm/test/tools/llvm-objdump/malformed-archives.test
llvm/tools/llvm-ar/llvm-ar.cpp