llvm-6502/lib
Simon Atanasyan 19ab8f850f [yaml2obj][ELF] Add an optional Size field to the YAML section declaration.
Now the only method to configure ELF section's content and size is to assign
a hexadecimal string to the `Content` field. Unfortunately this way is
completely useless when you need to declare a really large section.

To solve this problem this patch adds one more optional field `Size`
to the `RawContentSection` structure. When yaml2obj generates an ELF file
it uses the following algorithm:
1. If both `Content` and `Size` fields are missed create an empty section.
2. If only `Content` field is missed take section length from the `Size`
   field and fill the section by zero.
3. If only `Size` field is missed create a section using data from
   the `Content` field.
4. If both `Content` and `Size` fields are provided validate that the `Size`
   value is not less than size of `Content` data. Than take section length
   from the `Size`, fill beginning of the section by `Content` and the rest
   by zero.

Examples
--------
* Create a section 0x10000 bytes long filled by zero
  Name: .data
  Type: SHT_PROGBITS
  Flags: [ SHF_ALLOC ]
  Size: 0x10000

* Create a section 0x10000 bytes long starting from 'CA' 'FE' 'BA' 'BE'
  Name: .data
  Type: SHT_PROGBITS
  Flags: [ SHF_ALLOC ]
  Content: CAFEBABE
  Size: 0x10000

The patch reviewed by Michael Spencer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208995 91177308-0d34-0410-b5e6-96231b3b80d8
2014-05-16 16:01:00 +00:00
..
Analysis Add C API for thread yielding callback. 2014-05-16 02:33:15 +00:00
AsmParser Change the GlobalAlias constructor to look a bit more like GlobalVariable. 2014-05-16 13:34:04 +00:00
Bitcode Small dyn_cast and auto cleanup. 2014-05-16 14:22:33 +00:00
CodeGen Revert "Implement global merge optimization for global variables." 2014-05-16 13:02:18 +00:00
DebugInfo [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier. 2014-05-15 21:24:32 +00:00
ExecutionEngine [RuntimeDyld] Fix handling of i386 PC-rel external relocations. This fixes 2014-05-13 22:09:07 +00:00
IR Change the GlobalAlias constructor to look a bit more like GlobalVariable. 2014-05-16 13:34:04 +00:00
IRReader
LineEditor
Linker Change the GlobalAlias constructor to look a bit more like GlobalVariable. 2014-05-16 13:34:04 +00:00
LTO
MC Fix hardcoded slash to native path seperator which was exposed from llvm::sys::path. 2014-05-16 13:16:30 +00:00
Object [yaml2obj][ELF] Add an optional Size field to the YAML section declaration. 2014-05-16 16:01:00 +00:00
Option
ProfileData ProfileData: Allow multiple profiles in RawInstrProfReader 2014-05-16 00:38:00 +00:00
Support Fix hardcoded slash to native path seperator which was exposed from llvm::sys::path. 2014-05-16 13:16:30 +00:00
TableGen
Target Re-enable inline memcpy expansion for Thumb1. 2014-05-16 14:24:22 +00:00
Transforms Change the GlobalAlias constructor to look a bit more like GlobalVariable. 2014-05-16 13:34:04 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile