[PATCH] D67757: [yaml2obj/obj2yaml] - Add a support for .stack_sizes sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 20 01:28:48 PDT 2019


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: include/llvm/ObjectYAML/ELFYAML.h:183
+  static bool nameMatches(StringRef Name) {
+    return Name.startswith(".stack_sizes");
+  }
----------------
MaskRay wrote:
> I think we can just use `Name == ".stack_sizes"` for now. MC doesn't create `.stack_sizes.*`
> 
> Moreover, the error messages below just use plain `.stack_sizes`.
I am not sure here. I did it because llvm-readobj test case uses YAML with `.stack_sizes.*`:
https://github.com/llvm-mirror/llvm/blob/master/test/tools/llvm-readobj/stack-sizes.test#L35

I do not know was it intention or the person who wrote the test just did not know how to desribe sections with the same name in YAML.
It probably might be not that bad to support `.stack_sizes.*` too (and may be teach MC to produve them)?
Or we can fix `llvm-readobj` test first. Or go with `.stack_sizes.*` here and deside what to do in a follow-up patch for YAML+readobj.
What would you prefer?


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

https://reviews.llvm.org/D67757





More information about the llvm-commits mailing list