[PATCH] D59875: [yaml2obj][obj2yaml] - Teach yaml2obj/obj2yaml tools about STB_GNU_UNIQUE symbols.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 28 03:27:38 PDT 2019


jhenderson added inline comments.


================
Comment at: tools/obj2yaml/elf2yaml.cpp:268
     default:
       llvm_unreachable("Unknown ELF symbol binding");
     }
----------------
grimar wrote:
> jhenderson wrote:
> > Sounds to me like llvm_unreachable here is wrong, because it is reachable by any value not recognised. It should just be a normal error saying what the unknown binding value is. That can be a separate patch though if you want.
> Yeah, I noticed that but was not sure because I would not expect to see any another kind of bindings here (I just never heard about other ones I think). But now, after your comment, I think you're right, that perhaps better be an error just in case. I'll prepare a patch.
Thanks. Even if there are no other legitimate bindings, a bad tool could write an invalid value.


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

https://reviews.llvm.org/D59875





More information about the llvm-commits mailing list