[PATCH] D75527: [yaml2obj] - Add `ELFYAML::YAMLInt` to fix how we parse a relocation `Addend` key.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 00:03:06 PST 2020


grimar added a comment.

In D75527#1907129 <https://reviews.llvm.org/D75527#1907129>, @jhenderson wrote:

> My inclination is that yaml2obj should support both signed and unsigned variants of both hex and decimal numbers, if feasible. I think obj2yaml should print as unsigned hex numbers, since that is what is displayed by tools such as llvm-readelf. In other words, an addend of -4 would be printed by obj2yaml as "0xFFFFFFFFFFFFFFFC" in a 64-bit object, but could be specified as "-4", "-0x0000000000000004", or "0xFFFFFFFFFFFFFFFC" for yaml2obj.


Seems @MaskRay's answer https://reviews.llvm.org/D75527#1907129 responds this.

I think we can start with fixing of hex values accepting. The current patch does not change the obj2yaml's output. We can change/not-change it later.


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

https://reviews.llvm.org/D75527





More information about the llvm-commits mailing list