1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm
Eric Christopher df46cef31b Implements low-level object file format specific output for COFF and
ELF with support for:

- File headers
- Section headers + data
- Relocations
- Symbols
- Unwind data (only COFF/Win64)

The output format follows a few rules:
- Values are almost always output one per line (as elf-dump/coff-dump already do). - Many values are translated to something readable (like enum names), with the raw value in parentheses.
- Hex numbers are output in uppercase, prefixed with "0x".
- Flags are sorted alphabetically.
- Lists and groups are always delimited.

Example output:
---------- snip ----------
Sections [
  Section {
    Index: 1
    Name: .text (5)
    Type: SHT_PROGBITS (0x1)
    Flags [ (0x6)
      SHF_ALLOC (0x2)
      SHF_EXECINSTR (0x4)
    ]
    Address: 0x0
    Offset: 0x40
    Size: 33
    Link: 0
    Info: 0
    AddressAlignment: 16
    EntrySize: 0
    Relocations [
      0x6 R_386_32 .rodata.str1.1 0x0
      0xB R_386_PC32 puts 0x0
      0x12 R_386_32 .rodata.str1.1 0x0
      0x17 R_386_PC32 puts 0x0
    ]
    SectionData (
      0000: 83EC04C7 04240000 0000E8FC FFFFFFC7  |.....$..........|
      0010: 04240600 0000E8FC FFFFFF31 C083C404  |.$.........1....|
      0020: C3                                   |.|
    )
  }
]
---------- snip ----------

Relocations and symbols can be output standalone or together with the section header as displayed in the example.
This feature set supports all tests in test/MC/COFF and test/MC/ELF (and I suspect all additional tests using elf-dump), making elf-dump and coff-dump deprecated.

Patch by Nico Rieck!

llvm-svn: 178679
2013-04-03 18:31:38 +00:00
..
ADT SmallVector and SmallPtrSet allocations now power-of-two aligned. 2013-03-29 22:07:12 +00:00
Analysis Fix SCEV forgetMemoizedResults should search and destroy backedge exprs. 2013-03-26 03:14:53 +00:00
Assembly Enable *BasicBlockPass::createPrinterPass() 2013-02-08 23:37:41 +00:00
Bitcode Whitespace cleanup 2013-04-01 02:28:07 +00:00
CodeGen Count processor resources individually in MachineTraceMetrics. 2013-04-02 17:49:51 +00:00
Config Refine fenv.h handling: check if the desired macros exist, before using 2013-03-25 13:13:33 +00:00
DebugInfo Add support for the pubnames section to llvm-dwarfdump. 2013-02-12 16:20:28 +00:00
ExecutionEngine Add support for vector data types in the LLVM interpreter. 2013-04-01 15:53:30 +00:00
IR Add MDBuilder utilities for path-aware TBAA. 2013-04-02 19:50:49 +00:00
IRReader Split out the IRReader header and the utility functions it provides into 2013-03-26 02:25:37 +00:00
MC Dead code. 2013-03-19 22:12:47 +00:00
Object Implements low-level object file format specific output for COFF and 2013-04-03 18:31:38 +00:00
Option Use LLVM_DELETED_FUNCTION rather than '// do not implement' comments. 2013-02-18 23:11:17 +00:00
Support Implements low-level object file format specific output for COFF and 2013-04-03 18:31:38 +00:00
TableGen Make sure TableGen exits with an error code after printing errors. 2013-03-20 20:43:11 +00:00
Target Remove the old CodePlacementOpt pass. 2013-03-29 17:14:24 +00:00
Transforms [ASan] emit instrumentation for initialization order checking by default 2013-03-14 12:38:58 +00:00
AutoUpgrade.h remove autoupgrade support for really old-style debug info intrinsics. 2011-11-27 06:18:33 +00:00
CMakeLists.txt Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
DebugInfo.h Revert "Adding DIImportedModules to DIScopes." 2013-03-28 02:44:59 +00:00
DIBuilder.h Revert "Adding DIImportedModules to DIScopes." 2013-03-28 02:44:59 +00:00
GVMaterializer.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
InitializePasses.h Remove the old CodePlacementOpt pass. 2013-03-29 17:14:24 +00:00
InstVisitor.h Move all of the header files which are involved in modelling the LLVM IR 2013-01-02 11:36:10 +00:00
LinkAllIR.h Rename LinkAllVMCore.h to LinkAllIR.h since VMCore directory was renamed to IR. 2013-01-10 21:55:02 +00:00
LinkAllPasses.h Remove -print-dbginfo as it is unused & bitrotten. 2013-03-08 18:17:46 +00:00
Linker.h The Linker interface has some dead code after the cleanup in r172749 2013-03-19 15:26:24 +00:00
Pass.h moves doInitialization and doFinalization to the Pass class and removes some unreachable code in MachineModuleInfo 2012-12-03 21:56:57 +00:00
PassAnalysisSupport.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
PassManager.h One more step towards making doInitialization and doFinalization useful for 2012-11-29 17:47:05 +00:00
PassManagers.h Use a DenseMap instead of a std::map for AnalysisID -> Pass* maps. This reduces the pass-manager overhead from FPPassManager::runOnFunction() by about 10%. 2013-02-26 01:31:59 +00:00
PassRegistry.h
PassSupport.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00