Page MenuHomePhabricator

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

Authored by kubamracek on Jul 30 2019, 5:10 PM.


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

Diff Detail


Event Timeline

kubamracek created this revision.Jul 30 2019, 5:10 PM

Can you add a test case? You can potentially use llc to generate a .o file from .ll and run disassembler on the object file.

Adding test

This revision is now accepted and ready to land.Jul 31 2019, 8:50 AM
mtrent accepted this revision.Jul 31 2019, 2:01 PM

LGTM, visual inspection only.

This revision was automatically updated to reflect the committed changes.