[PATCH] D68086: [llvm-readelf] - Report a warning when .hash section contains a chain with a cycle.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 27 02:03:18 PDT 2019


jhenderson added inline comments.


================
Comment at: test/tools/llvm-readobj/elf-hash-symbols.test:365
+
+## Show that we report a warning when .hash section contains a chain with a cycle.
+
----------------
MaskRay wrote:
> an entry of the `bucket` array points to a cycle
Also "when a hash table" or similar.

I think combining the two suggests:

"Show that we report a warning for a hash table which contains an entry of the `bucket` array pointing to a cycle."


================
Comment at: tools/llvm-readobj/ELFDumper.cpp:3446
+        if (Visited[Ch]) {
+          reportWarning(createError(".hash section is invalid"), FileName);
+          break;
----------------
Perhaps worth giving more context to this message, i.e. something about a cycle being detected linking which buckets.


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

https://reviews.llvm.org/D68086





More information about the llvm-commits mailing list