[llvm-bugs] [Bug 47681] New: .hash section entry size != 4 is not supported

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Sep 29 09:47:19 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47681

            Bug ID: 47681
           Summary: .hash section entry size != 4 is not supported
           Product: tools
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: llvm-readobj
          Assignee: unassignedbugs at nondot.org
          Reporter: uweigand at de.ibm.com
                CC: jh7370.2008 at my.bristol.ac.uk, llvm-bugs at lists.llvm.org

On most platforms, the .hash section consists of a series of 4-byte values. 
However, for historial reasons this is not true for s390x and alpha.  See the
discussion on the binutils list here:
https://sourceware.org/pipermail/binutils/2000-June/005983.html

The current LLVM code (mostly in llvm-readelf) however hard-codes the size of 4
bytes.  This means that the tool is unable to handle most s390x (and presumably
alpha, but I cannot test this) binaries.  The symptoms include warning messages
like:
hash table nchain (2053) differs from symbol count derived from SHT_DYNSYM
section header (2329)
for just about any invocation of llvm-readelf, and incorrect output including
crashed when using the --hash-symbols option.

Ideally, the code should instead use the sh_entsize value of the .hash section
to determine whether the platform uses 4-byte or 8-byte entries.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200929/8330b64e/attachment.html>


More information about the llvm-bugs mailing list