[PATCH] D107421: [yaml2obj][XCOFF] Customize the string table.

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 4 07:24:46 PDT 2021


Higuoxing added inline comments.


================
Comment at: llvm/lib/MC/StringTableBuilder.cpp:80
   if (K == WinCOFF)
-    support::endian::write32le(Buf, Size);
+    support::endian::write32le(Buf, Length ? Length : Size);
   else if (K == XCOFF)
----------------
Personally, I don't like this approach. I would do the overwriting job in the client side. Besides, this change is dangerous, what will happen if `Length > Size` ?


================
Comment at: llvm/test/tools/yaml2obj/XCOFF/string-table.yaml:46-48
+# CASE2-NEXT:   [     4]   c
+# CASE2-NEXT:   [     6]   b
+# CASE2-NEXT:   [     8]   a
----------------
It looks that the string table is reversed?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107421



More information about the llvm-commits mailing list