[PATCH] D95505: [yaml2obj] Initial support for 32-bit XCOFF in yaml2obj.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 26 01:52:27 PDT 2021


jhenderson added a comment.

Some more minor comments. I'll take a look at the tests next time.



================
Comment at: llvm/lib/ObjectYAML/XCOFFEmitter.cpp:67
+      if (CurrentOffset > MaxRawDataSize) {
+        ErrHandler("the maximum size permitted for relocation data is " +
+                   Twine(MaxRawDataSize));
----------------
Sorry, I might have confused you with my previous comment. `MaxRawDataSize` is being compared to `CurrentOffset`, so it's not the size of the relocations/sections that is being constrained, if I read it correctly. Perhaps you could change the message to something like "maximum object size of XXX exceeded when writing relocation data". What do you think?


================
Comment at: llvm/lib/ObjectYAML/XCOFFEmitter.cpp:90
+      if ((I + 1) > MaxSectionIndex) {
+        ErrHandler("the maximum index permitted for section is " +
+                   Twine(MaxSectionIndex));
----------------
How about this?


================
Comment at: llvm/lib/ObjectYAML/XCOFFEmitter.cpp:136-137
+    if (CurrentOffset > MaxRawDataSize) {
+      ErrHandler("the maximum size permitted for symbol is " +
+                 Twine(MaxRawDataSize));
+      return false;
----------------
Same as relocation comment above.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D95505



More information about the llvm-commits mailing list