llvm-6502/tools
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
..
bugpoint
bugpoint-passes
gold
llc Unify command line handling of MCTargetOptions and remove extra 2014-05-15 01:10:50 +00:00
lli
llvm-ar
llvm-as raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-bcanalyzer
llvm-c-test
llvm-config
llvm-cov llvm-cov: Implement --no-output 2014-05-07 02:11:18 +00:00
llvm-diff
llvm-dis raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-dwarfdump [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier. 2014-05-15 21:24:32 +00:00
llvm-extract Use range loops. 2014-05-08 19:30:17 +00:00
llvm-jitlistener
llvm-link raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-lto raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-mc Unify command line handling of MCTargetOptions and remove extra 2014-05-15 01:10:50 +00:00
llvm-mcmarkup
llvm-nm Teach llvm-nm to know about fat archives (aka MachOUniversal files 2014-05-14 21:18:50 +00:00
llvm-objdump
llvm-profdata raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-readobj [llvm-readobj] Print values of FLAGS and MIPS_FLAGS dynamic table tags 2014-05-11 08:48:09 +00:00
llvm-rtdyld [tools][llvm-rtdyld] Add a '-dylib <file>' option to llvm-rtdyld to load shared 2014-05-13 22:37:41 +00:00
llvm-shlib autoconf: Fix soname for libLLVM-Major.Minor.so (2nd try) 2014-05-13 19:37:03 +00:00
llvm-size
llvm-stress raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
llvm-symbolizer [DWARF parser] Use enums instead of bitfields in DILineInfoSpecifier. 2014-05-15 21:24:32 +00:00
lto Fix gcc -pedantic warning in lto.cpp. 2014-05-05 12:24:08 +00:00
macho-dump
msbuild
obj2yaml [yaml2obj][ELF] Add an optional Size field to the YAML section declaration. 2014-05-16 16:01:00 +00:00
opt raw_ostream: Forward declare OpenFlags and include FileSystem.h only where necessary. 2014-04-29 23:26:49 +00:00
yaml2obj [yaml2obj][ELF] Add an optional Size field to the YAML section declaration. 2014-05-16 16:01:00 +00:00
CMakeLists.txt
LLVMBuild.txt
Makefile