[PATCH] D63394: [yaml2obj][ELF] Suport STT_LOOS, STT_HIOS, STT_LOPROC and STT_HIPROC.

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 09:56:36 PDT 2019


rupprecht added a comment.

In D63394#1546401 <https://reviews.llvm.org/D63394#1546401>, @jhenderson wrote:

> In D63394#1546292 <https://reviews.llvm.org/D63394#1546292>, @ychen wrote:
>
> > I'm totally fine with not commit this. But it seems just a small convenience from a tooling perspective (no need for the semantics of the symbol type) when you need the value but not in an OS or processor specific way and STT_LOOS looks better than "10"?
>
>
> I may have been a bit hasty rejecting this. My concern is that I have already seen instances in LLVM where people possibly not well-versed in ELF try to use these as actual types in testing and in tools consuming these values, which can lead to confusion or worse, bogus output (e.g. llvm-readelf claiming that a symbol's type is STT_LOOS). @grimar, do you have any thoughts?


I agree it doesn't make sense to print as a symbol value, although I wouldn't mind if obj2yaml could somehow print it as a comment, e.g.:

  Type: 10  # STT_LOOS
  Type: 11  # STT_LOOS+1

Similar to the behavior seen in `tools/llvm-readobj/elf-section-types.test` of printing `LOOS+0xF00`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63394





More information about the llvm-commits mailing list