[llvm] [z/OS] Add z/OS archive reading support (PR #187110)
zhijian lin via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 11:00:34 PDT 2026
================
@@ -1042,6 +1170,14 @@ Expected<Archive::Child> Archive::Symbol::getMember() const {
// the archive of the member that defines the symbol. Which is what
// is needed here.
Offset = read64le(Offsets + SymbolIndex * 16 + 8);
+ } else if (Parent->kind() == K_ZOS) {
+ // The contents of the symbol table member in order are:
+ // 1. The number of symbols, NS (4 byte integer).
+ // 2. NS pairs of integers (the first in each pair of integers is the offset
+ // to the header of the entry... the second being coded attributes).
+ // Length is NS*(4+4) bytes.
+ // 3. NS null terminated strings of corresponding symbol names.
+ Offset = read32be(Offsets + SymbolIndex * 8);
----------------
diggerlin wrote:
I think the comment you add here is not precise , you need to explain why it is *8.
https://github.com/llvm/llvm-project/pull/187110
More information about the llvm-commits
mailing list