[all-commits] [llvm/llvm-project] b259ce: [llvm-readobj] Derive dynamic symtab size from DT_...

James Henderson via All-commits all-commits at lists.llvm.org
Mon Mar 23 05:21:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b259ce998f5537fd4d8ac8418de643406344141d
      https://github.com/llvm/llvm-project/commit/b259ce998f5537fd4d8ac8418de643406344141d
  Author: James Henderson <james.henderson at sony.com>
  Date:   2020-03-23 (Mon, 23 Mar 2020)

  Changed paths:
    M llvm/test/tools/llvm-readobj/ELF/all.test
    A llvm/test/tools/llvm-readobj/ELF/dyn-symbols-size-from-hash-table.test
    M llvm/tools/llvm-readobj/ELFDumper.cpp

  Log Message:
  -----------
  [llvm-readobj] Derive dynamic symtab size from DT_HASH

If the section headers have been removed by a tool such as llvm-objcopy
or llvm-strip, previously llvm-readobj/llvm-readelf would not dump the
dynamic symbols when --dyn-symbols was specified. However, the nchain
value of the DT_HASH data specifies the number of dynamic symbols, so if
it is present, we can use that. This patch implements this behaviour.

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

Reviewed by: grimar, MaskRay

Differential Revision: https://reviews.llvm.org/D76352




More information about the All-commits mailing list