[PATCH] D107421: [yaml2obj][XCOFF] Customize the string table.
Esme Yi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 9 23:47:28 PDT 2021
Esme marked an inline comment as done.
Esme added a comment.
Thank you! @jhenderson and Higuoxing
After reconsidered from a user's perspective and referred to ELF's approach, I modified some features of the patch.
We can see these features from cases in llvm/test/tools/yaml2obj/XCOFF/string-table.yaml.
> This allows you to have a test case for a table which is too short for the length field.
I don't think we could do it because we only generate the string table if its size is bigger than 4: `StrTbl.getSize() > 4`.
I didn't add the raw "Contents" field because I'm not sure this feature is necessary.
> not modifying the StringTableBuilder interface.
I agree that the original way of changing the length value was very unreasonable.
But to pad the string table to the specified length have to be done in the StringTableBuilder interface.
================
Comment at: llvm/test/tools/yaml2obj/XCOFF/string-table.yaml:46-48
+# CASE2-NEXT: [ 4] c
+# CASE2-NEXT: [ 6] b
+# CASE2-NEXT: [ 8] a
----------------
Higuoxing wrote:
> It looks that the string table is reversed?
Yes, it looks like this is how StringTableBuilder stores names. And I thinks it's fine?
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