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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 11 22:37:19 PDT 2022


MaskRay accepted this revision.
MaskRay added a comment.

> [AIX] support read global symbol of big archive

"Support reading global symbols in a big archive"



================
Comment at: llvm/lib/Object/Archive.cpp:1207-1210
+    if (GlobalSymTblContentOffset + Size > BufferSize) {
+      Err = malformedError("global symbol table content at offset " +
+                           Twine(GlobalSymTblContentOffset) + " and size " +
+                           Twine(Size) + " is past the end of file");
----------------
jhenderson wrote:
> Same comments as above.
Hex offsets are common. If you choose hex for size, that seems fine (I'd do it, too).


================
Comment at: llvm/test/tools/llvm-ar/malformed-global-symbol-table-bigarchive.test:12
+# RUN: %python -c "with open('t2.a', 'r+b') as input: input.truncate(656)"
+#
+# RUN: not llvm-ar t t.a 2>&1 | FileCheck -DFILE=t.a %s
----------------
Delete the otherwise empty `#`


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