1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-23 21:13:02 +02:00
llvm-mirror/test/Object
Simon Atanasyan 808d7bc7a0 [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.

llvm-svn: 208995
2014-05-16 16:01:00 +00:00
..
ARM
Inputs Teach llvm-nm to know about fat archives (aka MachOUniversal files 2014-05-14 21:18:50 +00:00
Mips [tests] Cleanup initialization of test suffixes. 2013-08-16 00:37:11 +00:00
X86 [yaml2obj] Follow-up to the r208228 and r208406. Remove duplicated YAML 2014-05-09 13:57:33 +00:00
ar-create.test llvm/test/Object/ar-create.test: Relax a CHECK line to satisfy localized message catalogue. 2013-07-16 23:17:22 +00:00
archive-delete.test
archive-error-tmp.txt On error, close the temporary file descriptor. 2013-07-16 16:00:32 +00:00
archive-extract-dir.test Split openFileForWrite into windows and unix versions. 2013-07-19 15:02:03 +00:00
archive-format.test Only verify the length in archive test, we can't make assumptions on the spacing. 2013-07-13 15:21:39 +00:00
archive-long-index.test Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files. 2014-05-09 23:57:49 +00:00
archive-move.test
archive-replace-pos.test Replace archive members in the old position. 2013-07-22 15:11:51 +00:00
archive-symtab.test Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files. 2014-05-09 23:57:49 +00:00
archive-toc.test Update tests to use the new format of printing a TimeValue. It's a bit 2014-04-28 01:24:32 +00:00
archive-update.test The archive update test has a subtle race condition in it: if the test 2013-07-14 10:46:51 +00:00
check_binary_output.ll raw_ostream.cpp: Introduce <fcntl.h> to let O_BINARY provided. Or, llvm::outs() would be set to O_TEXT by default. 2013-07-17 02:21:10 +00:00
coff-archive-short.test
coff-archive.test
corrupt.test [Object] Split the ELF interface into 3 parts. 2013-08-08 22:27:13 +00:00
directory.ll llvm-ar: Let opening a directory failed in llvm-ar. 2013-11-08 12:35:56 +00:00
elf-reloc-no-sym.test
extract.ll Update tests to use the new format of printing a TimeValue. It's a bit 2014-04-28 01:24:32 +00:00
lit.local.cfg
mangle-ir.ll Now that it is possible, use the mangler in IRObjectFile. 2014-02-28 02:17:23 +00:00
nm-archive.test Correct word hyphenations 2013-12-05 05:44:44 +00:00
nm-error.test We do use pipefail these days. Update the test. 2014-01-29 04:08:05 +00:00
nm-ir.ll Add a SymbolicFile interface between Binary and ObjectFile. 2014-02-21 20:10:59 +00:00
nm-shared-object.test Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files. 2014-05-09 23:57:49 +00:00
nm-trivial-object.test Fix llvm-nm to print the full 64-bit address for symbols in 64-bit object files. 2014-05-09 23:57:49 +00:00
nm-universal-binary.test Teach llvm-nm to know about fat archives (aka MachOUniversal files 2014-05-14 21:18:50 +00:00
nm-weak-global-macho.test Fix llvm-nm to mach OS X's nm on some tests. 2013-11-02 05:03:24 +00:00
obj2yaml-coff-long-file-symbol.test Object: Output .file symbols properly 2014-03-20 06:29:02 +00:00
obj2yaml-coff-weak-external.test obj2yaml: Don't crash if the characteristics field is zero 2014-04-09 16:38:15 +00:00
obj2yaml.test [obj2yaml][ELF] Print relocation's offset as a hex number. Use a proper 2014-05-15 18:04:09 +00:00
objdump-file-header.test
objdump-private-headers.test
objdump-relocations.test [Object][ELF][Mips] Print symbol name for MIPS ELF relocations. 2014-01-23 15:05:45 +00:00
objdump-section-content.test
objdump-sectionheaders.test
objdump-symbol-table.test
readobj-elf-versioning.test Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
readobj-shared-object.test Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
readobj.test
relocation-executable.test
simple-archive.test
yaml2obj-elf-bits-endian.test
yaml2obj-elf-file-headers-with-e_flags.yaml [llvm-readobj] Add support for Mips specific ELF header e_flags. 2014-05-01 11:07:19 +00:00
yaml2obj-elf-file-headers.yaml
yaml2obj-elf-rel.yaml Use the new StringTableBuilder in yaml2elf 2014-04-30 19:38:09 +00:00
yaml2obj-elf-section-basic.yaml [yaml2obj][ELF] Add an optional Size field to the YAML section declaration. 2014-05-16 16:01:00 +00:00
yaml2obj-elf-section-invalid-size.yaml [yaml2obj][ELF] Add an optional Size field to the YAML section declaration. 2014-05-16 16:01:00 +00:00
yaml2obj-elf-symbol-basic.yaml Teach llvm-readobj to print human friendly description of reserved sections. 2014-03-24 05:00:34 +00:00
yaml2obj-elf-symbol-LocalGlobalWeak.yaml
yaml2obj-readobj.test [yaml2obj] Add "-o" command line option to specify an output file name. 2014-05-15 16:14:02 +00:00