[LLVMdev] awkward object file abstractions

Steve King steve at metrokings.com
Tue Sep 9 21:07:15 PDT 2014


Hello LLVM,
I'm trying to make symbolizing work in llvm-objdump.  This comment in
ObjectFile.h gives me some heartburn:

https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Object/ObjectFile.h#L196

// The main goal of
// this is to allow SymbolRef::SymbolPimpl to point directly to the symbol
// entry in the memory mapped object file. SymbolPimpl cannot contain any
// virtual functions because then it could not point into the memory mapped
// file.

Is this still a goal and if so, why?  Building symbol objects on top
of the file's memory image causes some unnatural acts, e.g. no virtual
functions, for what otherwise could be an unsurprising class
hierarchy.

Thanks,
-steve



More information about the llvm-dev mailing list