[llvm-commits] [llvm] r140153 - in /llvm/trunk/tools/llvm-objdump: MCFunction.cpp MCFunction.h MachODump.cpp

Benjamin Kramer benny.kra at googlemail.com
Tue Sep 20 11:49:36 PDT 2011


On Tue, Sep 20, 2011 at 11:16, Evan Cheng <evan.cheng at apple.com> wrote:
> Thanks. Next request. Shouldn't MCFunction live in lib/MC?

The reason it lives inside llvm-objdump is that I still consider this
a prototype. There are no real "functions" at the machine code level,
jumps can arbitrarily leave the current "function".
There may be a better abstraction for this. I was also looking into
representing the whole .text section as a big disassembled object and
then adding labels to it, but this can become ugly if there's data
inside the code that happens to match a (variable length) encoding of
a real instruction. Then all the disassembly that follows that data
section will become wrong and the CFG generation algorithm will be
confused.

- Ben



More information about the llvm-commits mailing list