Add file with Xtensa ELF relocations. Add Xtensa support to ELF.h,
ELFObject.h and ELFYAML.cpp. Add simple test of Xtensa ELF representation in YAML.
I took as a basis naming conventions of the e_flags from binutils (binutils/include/elf/xtensa.h). There used similar names for the architecture mask and base machine architecture with only differenece in prefix (E_ or EF_).
It is missing also in binutils (binutils/include/elf/xtensa.h). So I left it as is.
LGTM, but I know very little about the LLVM backend.
Also, I see that this patch lacks one change that are included by the very similar RISC-V patch: https://github.com/lowRISC/riscv-llvm/blob/master/0003-RISCV-Add-RISC-V-ELF-defines.patch, namely the equivalent of ElfHeaderRISCVFlags in ELFDumper.cpp. I don't know whether that has a reason but mentioning it just in case.
Looking at https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=include/elf/msp430.h for comparison, they use EF_<arch>_MACH for the mask and E_<arch>_MACH_<sub> for what seems to be the sub-architecture. I see a very similar pattern for AVR. In both cases, LLVM still uses the EF_ prefix for the subarch.
Use // as the rest of the file uses.
Add a test test/tools/llvm-readobj/reloc-types-elf-xtensa.test
Delete this file. Add to test/Object/obj2yaml.test instead. You may follow the ELF-X86-64: yaml2obj+obj2yaml test.
Delete this file.