[PATCH] D81842: [llvm-readelf] - Do not omit a zero symbol value when printing relocations.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 15 06:28:57 PDT 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
grimar added a comment.

Note: reloc-zero-name-or-value.test was added in D59823 <https://reviews.llvm.org/D59823>. Seems it only documented the existent behavior.


Previously we only printed a symbol value when it has a non-empty name
or non-zero value.

This patch changes the behavior. Now we only omit a symbols value when
a relocation does not reference a symbol (i.e. symbol index == 0).

I think it is what GNU readelf does, looking on its output.
And such behavior looks much more reasonable to me.


https://reviews.llvm.org/D81842

Files:
  llvm/test/tools/llvm-readobj/ELF/reloc-zero-name-or-value.test
  llvm/tools/llvm-readobj/ELFDumper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81842.270733.patch
Type: text/x-patch
Size: 4745 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200615/3b22a474/attachment.bin>


More information about the llvm-commits mailing list