llvm-project/llvm/test/tools/obj2yaml
George Rimar 4e71702cd4 [yaml2obj][obj2yaml] - Use a single "Other" field instead of "Other", "Visibility" and "StOther".
Currenly we can encode the 'st_other' field of symbol using 3 fields.
'Visibility' is used to encode STV_* values.
'Other' is used to encode everything except the visibility, but it can't handle arbitrary values.
'StOther' is used to encode arbitrary values when 'Visibility'/'Other' are not helpfull enough.

'st_other' field is used to encode symbol visibility and platform-dependent
flags and values. Problem to encode it is that it consists of Visibility part (STV_* values)
which are enumeration values and the Other part, which is different and inconsistent.

For MIPS the Other part contains flags for all STO_MIPS_* values except STO_MIPS_MIPS16.
(Like comment in ELFDumper says: "Someones in their infinite wisdom decided to make
STO_MIPS_MIPS16 flag overlapped with other ST_MIPS_xxx flags."...)

And for PPC64 the Other part might actually encode any value.

This patch implements custom logic for handling the st_other and removes
'Visibility' and 'StOther' fields.

Here is an example of a new YAML style this patch allows:

- Name:  foo
  Other: [ 0x4 ]
- Name:  bar
  Other: [ STV_PROTECTED, 4 ]
- Name:  zed
  Other: [ STV_PROTECTED, STO_MIPS_OPTIONAL, 0xf8 ]

Differential revision: https://reviews.llvm.org/D66886

llvm-svn: 370472
2019-08-30 13:39:22 +00:00
..
Inputs [yaml2obj/obj2yaml] - Add a basic support for extended section indexes. 2019-08-08 09:49:05 +00:00
aix_xcoff.test [XCOFF] Implement parsing symbol table for xcoffobjfile and output as yaml format 2019-05-28 14:37:59 +00:00
aix_xcoff_truncated_file_header.test [XCOFF] Add functionality for parsing AIX XCOFF object file headers 2019-04-04 00:53:21 +00:00
basic-minidump.yaml Minidump: Add support for the MemoryList stream 2019-05-16 15:17:30 +00:00
coff-bss.s [COFF] Fix .bss section size bug in obj2yaml / yaml2obj 2019-05-10 21:53:44 +00:00
coff-long-file-symbol.test [test/Object, obj2yaml] - Move test cases from test/Object and cleanup. 2019-07-12 10:29:29 +00:00
coff-long-section-name.test [test/Object, obj2yaml] - Move test cases from test/Object and cleanup. 2019-07-12 10:29:29 +00:00
coff-section-aux-symbol.test [test/Object, obj2yaml] - Move test cases from test/Object and cleanup. 2019-07-12 10:29:29 +00:00
coff-weak-external.test [test/Object, obj2yaml] - Move test cases from test/Object and cleanup. 2019-07-12 10:29:29 +00:00
duplicate-symbol-and-section-names.test [yaml2obj/obj2yaml] - Allow having the symbols and sections with duplicated names. 2019-06-25 08:22:57 +00:00
dynamic-section-arch-tags.test [llvm-objdump/llvm-readobj/obj2yaml/yaml2obj] Support DT_PPC_GOT and DT_PPC_OPT 2019-06-05 01:36:48 +00:00
dynamic-section.test [BinaryFormat] Add DT_USED tag into dynamic section. 2019-03-06 01:28:40 +00:00
elf-entsize.yaml
elf-gnu-unique-symbols.yaml [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
elf-mips-eflags.yaml [obj2yaml] - MIPS: move and improve testing of the e_flags 2019-08-07 09:35:04 +00:00
elf-null-section.yaml [obj2yaml] - Teach tool to dump SHT_NULL sections. 2019-08-05 13:16:06 +00:00
elf-reladyn-section-shinfo.yaml [yaml2elf/obj2yaml] - Allow normal parsing/dumping of the .rela.dyn section 2019-04-18 11:02:07 +00:00
elf-shinfo.yaml [yaml2obj/obj2yaml] - Make RawContentSection::Content and RawContentSection::Size optional 2019-06-10 12:43:18 +00:00
elf-shlink.yaml [obj2yaml] - Report a error when unable to resolve a sh_link reference properly. 2019-07-29 07:58:29 +00:00
elf-sht-symtab-shndx.yaml [yaml2obj/obj2yaml] - Add a basic support for extended section indexes. 2019-08-08 09:49:05 +00:00
elf-symbol-visibility.yaml [yaml2obj][obj2yaml] - Use a single "Other" field instead of "Other", "Visibility" and "StOther". 2019-08-30 13:39:22 +00:00
invalid_input_file.test [test/Object] - Cleanup the Object\obj2yaml.test a bit. 2019-08-06 14:34:39 +00:00
lit.local.cfg [obj2yaml][yaml2obj]Locate all .yaml and .test tests 2019-02-20 15:13:44 +00:00
missing_symtab.test [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
no-symbol-reloc.test [test/Object, obj2yaml] - Move test cases from test/Object and cleanup. 2019-07-12 10:29:29 +00:00
section-group.test Recommit r366052 "[obj2yaml] - Rework tool's error reporting logic for ELF target." 2019-07-15 11:53:39 +00:00
section-type.yaml [yaml2obj][obj2yaml] Remove section type range markers from allowed mappings and support hex values 2019-02-19 16:22:21 +00:00
sections-info.yaml [yaml2obj/obj2yaml] - Make RawContentSection::Info Optional<> 2019-06-19 08:57:38 +00:00
special-symbol-indices.yaml [yaml2obj/obj2yaml] - Add a basic support for extended section indexes. 2019-08-08 09:49:05 +00:00
symbol-type.yaml [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
verdef-section.yaml [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
verneed-section.yaml [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00
versym-section.yaml [yaml2obj][obj2yaml] - Change how symbol's binding is descibed when parsing/dumping. 2019-04-03 14:53:42 +00:00