[PATCH] D124865: [AIX] support read global symbol of big archive

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 08:56:28 PDT 2022


DiggerLin added a comment.



> `delete.test` is a test that shows that llvm-ar can delete symbols when its members are deleted. It's hardly comprehensive coverage of the archive symbol table code. However, there are many other symbol table tests both in the Object and tools/llvm-ar test directories. It's not clear to me why the changes you've made didn't cause a test to start passing/failing when it wasn't before, at least on AIX OS. You need to investigate, and ensure there is coverage of the new code you've added in a test dedicated to symbol table reading etc.

  
  1. We add "XFAIL" into a lot test cases in the patch https://reviews.llvm.org/D122746 "[AIX][XCOFF] print unsupported message for llvm-ar big archive write operation" , after implement , https://reviews.llvm.org/D123949 [AIX] support write operation of big archive. The "XFAIL" of some of the XFAIL test cases in https://reviews.llvm.org/D122746 are removed in patch D123949.

and there are still has some test cases still has "XFAIL" , after  investigated those test cases, I created several patches for the XFAIL test cases. 
including:

  D124017 [AIX] fixed llvm-ar can not read empty big archive correctly.
  D124940 [AIX] llvm-link support big archive.

2. there is source code as https://github.com/llvm/llvm-project/blob/main/llvm/tools/llvm-ar/llvm-ar.cpp#L916

  Kind = !NewMembersP->empty() ? NewMembersP->front().detectKindFromObject()
                                     : object::Archive::getDefaultKindForHost();

in most of the test cases which has "llvm-nm --print-armap" , when create archive which new object file, the first object file is no XCOFF object file. so they do not generate big archive.
only the llvm/test/tools/llvm-ar/delete.test , it has (first new member is not object file, it will decided by host OS)

RUN: llvm-ar rc %t.a %t1.txt %t-delete.o %t-keep.o %t2.txt
==========================================================

so it will generate the big archive based on the host. it effected by the patch.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124865/new/

https://reviews.llvm.org/D124865



More information about the llvm-commits mailing list