[llvm-commits] [PATCH 0/5] ELF object support

Daniel Dunbar daniel at zuster.org
Thu Aug 12 10:44:05 PDT 2010


Hi Matt,

I scanned the patches, they look reasonable to me. I have more review
comments, but I am eager to see this stuff land and I know others are
as well. I would rather get it in, and work from there.

Assuming this stuff works, and passes some basic sanity checks, can
you go ahead and commit it?

It would be nice to get some tests for it -- have you thought at all
about writing a simple ELF object file dumping tool like we have for
Mach-O and COFF?

 - Daniel

On Wed, Aug 11, 2010 at 3:20 PM, Matt Fleming <matt at console-pimps.org> wrote:
> This series contains the patches that have been sitting in my github
> tree that me and Roman Divacky have been working on for a while now. It
> isn't a complete implementation but is enough to get a semi-complete
> relocatable ELF file emitted.
>
> This is version 2 of the series. I've reworked some of the code based on
> comments and feedback from the llvm-commits list and Eli Friedman. The
> ELF object writer code is now endian safe, many magic numbers have been
> replaced with symbols and MCELFStreamer now inherits from
> MCObjectStreamer instead of MCStreamer.
>
> Again, all comments welcome.
>
> Matt Fleming (5):
>  ELF entry size support.
>  Record a symbol's size which is needed for ELF symbol tables.
>  Layout helper function.
>  Add ELF ObjectWriter and Streamer support.
>  Hookup ELF support for X86.
>
>  include/llvm/MC/ELFObjectWriter.h   |   46 ++
>  include/llvm/MC/MCAssembler.h       |   16 +
>  include/llvm/MC/MCContext.h         |    3 +-
>  include/llvm/MC/MCELFSymbolFlags.h  |   54 ++
>  include/llvm/MC/MCSectionELF.h      |   10 +-
>  include/llvm/MC/MCStreamer.h        |    6 +
>  include/llvm/Support/ELF.h          |    6 +
>  lib/MC/CMakeLists.txt               |    2 +
>  lib/MC/ELFObjectWriter.cpp          | 1032 +++++++++++++++++++++++++++++++++++
>  lib/MC/MCAssembler.cpp              |   37 ++-
>  lib/MC/MCContext.cpp                |    4 +-
>  lib/MC/MCELFStreamer.cpp            |  401 ++++++++++++++
>  lib/Target/X86/X86AsmBackend.cpp    |   17 +-
>  lib/Target/X86/X86TargetMachine.cpp |    3 +-
>  14 files changed, 1625 insertions(+), 12 deletions(-)
>  create mode 100644 include/llvm/MC/ELFObjectWriter.h
>  create mode 100644 include/llvm/MC/MCELFSymbolFlags.h
>  create mode 100644 lib/MC/ELFObjectWriter.cpp
>  create mode 100644 lib/MC/MCELFStreamer.cpp
>
>




More information about the llvm-commits mailing list