[PATCH] D82010: [llvm-readobj] - Add a validation of the GNU hash table to printGnuHashHistogram().

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 18 05:58:01 PDT 2020


jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.

In D82010#2100253 <https://reviews.llvm.org/D82010#2100253>, @grimar wrote:

> In D82010#2100106 <https://reviews.llvm.org/D82010#2100106>, @jhenderson wrote:
>
> > If I'm following things right, the behaviour for an empty dynsym is changing with this patch. Is the new behaviour compatible with GNU?
>
>
> Right. It it what I mentioned in the description:
>  "Also with this change we start to report a warning when the histogram is requested for
>  the GNU hash table, but the dynamic symbols table is empty (size == 0)."
>
> GNU readelf doesn't warn about that. But isn't it a bug? When we have a zero sized dynamic table it is already incorrect, because it should have a zero symbol at least.
>  And it is wierd to have a hash table in this case too.


You're probably right that it's a bug. I think I'm okay with this. LGTM.


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

https://reviews.llvm.org/D82010





More information about the llvm-commits mailing list