[all-commits] [llvm/llvm-project] e9aac2: [llvm-objdump] Look in all viable sections for cal...

James Henderson via All-commits all-commits at lists.llvm.org
Wed Apr 22 04:48:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e9aac2c3ef4ccbe26a05e9aaea90e0df66cec04d
      https://github.com/llvm/llvm-project/commit/e9aac2c3ef4ccbe26a05e9aaea90e0df66cec04d
  Author: James Henderson <james.henderson at sony.com>
  Date:   2020-04-22 (Wed, 22 Apr 2020)

  Changed paths:
    M llvm/test/tools/llvm-objdump/X86/disassemble-same-section-addr.test
    M llvm/tools/llvm-objdump/llvm-objdump.cpp

  Log Message:
  -----------
  [llvm-objdump] Look in all viable sections for call/branch targets

Prior to this patch, llvm-objdump would only look in the last section
(according to the section header table order) that matched an address
for a symbol when identifying the target symbol of a call or branch
operation. If there are multiple sections with the same address, due to
some of them being empty, it did not look in those, even if the symbol
couldn't be found in the first section looked in.

This patch causes llvm-objdump to look in all sections for possible
candidate symbols. If there are multiple possible symbols, it picks one
from a non-empty section, if possible (as that is more likely to be the
"real" symbol since functions can't really be in emptiy sections),
before falling back to those in empty sections. If all else fails, it
falls back to absolute symbols as it did before.

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

Reviewed by: grimar, Higuoxing




More information about the All-commits mailing list