HomePhabricator

[llvm-objdump] Fix jumptable detection when disassembling Mach-O binaries

Authored by kubamracek on Aug 1 2019, 8:51 AM.

Description

[llvm-objdump] Fix jumptable detection when disassembling Mach-O binaries

  • Add LC_SEGMENT_64 handling in getSectionsAndSymbols to be able to find the base segment address from 64-bit Mach-O binaries.
  • Add "data in code" detection into the !symbolTableWorked case, extract it into a separate function.
  • Fix uninitialized variable usage on BaseSegmentAddress (initialize to 0).
  • Add test.

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

llvm-svn: 367578