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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 26 08:35:45 PDT 2019


MaskRay 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.
+
----------------
an entry of the `bucket` array points to a cycle


================
Comment at: test/tools/llvm-readobj/elf-hash-symbols.test:391
+## PT_LOAD's p_vaddr is 0x0. PT_LOAD's p_offset = 0x1bc. DT_HASH value is 0x0. 
+## llvm-readelf will read .hash content from p_offset + (p_vaddr - DT_HASH value) = 0x1bc.
+## This matches the file offset of the .hash section.
----------------
Suggested wording:

llvm-readelf will read the hash table from the file offset `p_offset + (p_vaddr - DT_HASH) = p_offset + (0 - 0) = p_offset`, which is the start of PT_LOAD, i.e. the file offset of .hash


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

https://reviews.llvm.org/D68086





More information about the llvm-commits mailing list