[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 13:32:57 PDT 2022


DiggerLin marked 3 inline comments as done.
DiggerLin added inline comments.


================
Comment at: llvm/lib/Object/Archive.cpp:1189-1192
+  if (RawOffset.getAsInteger(10, GlobSymOffset))
+    Err = malformedError(
+        "malformed AIX big archive: global symbol table offset \"" + RawOffset +
+        "\" is not a number");
----------------
jhenderson wrote:
> Test case?
I do not think we can add a test case for the malformed in the test case. 
since we do not support yaml2obj  for big archive, we can not generate malformed big archive.  there is https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-objdump/malformed-archives.test#L182 
as in patch https://reviews.llvm.org/D111889#change-i2aT5QfHJFnJ



================
Comment at: llvm/lib/Object/Archive.cpp:1214-1217
+    if (RawOffset.getAsInteger(10, Size)) {
+      Err = malformedError(
+          "malformed AIX big archive: global symbol table size \"" + RawOffset +
+          "\" is not a number");
----------------
jhenderson wrote:
> Test case?
as above


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