[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:07:40 PDT 2026
================
@@ -1171,6 +1307,9 @@ Archive::symbol_iterator Archive::symbol_begin() const {
buf += ran_strx;
} else if (kind() == K_AIXBIG) {
buf = getStringTable().begin();
+ } else if (kind() == K_ZOS) {
+ uint32_t symbol_count = read32be(buf);
+ buf += sizeof(uint32_t) + (symbol_count * (sizeof(uint64_t)));
----------------
diggerlin wrote:
please add some comment for the code
`buf += sizeof(uint32_t) + (symbol_count * (sizeof(uint64_t)));`
I think you reorganize your above comment to explain above code.
// 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.
https://github.com/llvm/llvm-project/pull/187110
More information about the llvm-commits
mailing list