[all-commits] [llvm/llvm-project] 3d381a: [llvm-nm][MachO] Don't call getFlags on redacted s...

Visoiu Mistrih Francis via All-commits all-commits at lists.llvm.org
Fri Dec 4 22:10:34 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3d381a710220100722465ead9c64874621edead4
      https://github.com/llvm/llvm-project/commit/3d381a710220100722465ead9c64874621edead4
  Author: Francis Visoiu Mistrih <francisvm at yahoo.com>
  Date:   2020-12-04 (Fri, 04 Dec 2020)

  Changed paths:
    A llvm/test/tools/llvm-nm/AArch64/Inputs/redacted-function.macho-aarch64
    A llvm/test/tools/llvm-nm/AArch64/macho-redacted-function.test
    M llvm/tools/llvm-nm/llvm-nm.cpp

  Log Message:
  -----------
  [llvm-nm][MachO] Don't call getFlags on redacted symbols

Avoid calling getFlags on a non-existent symbol.

The way this is triggered is by calling strip -N on a binary, which sets
the MH_NLIST_OUTOFSYNC_WITH_DYLDINFO header flag. Then, in the
LC_FUNCTION_STARTS command, nm is trying to print the stripped symbols
and needs the proper checks.




More information about the All-commits mailing list