diff options
| author | Georgii Rymar <grimar@accesssoftek.com> | 2019-12-24 12:45:53 +0300 |
|---|---|---|
| committer | Georgii Rymar <grimar@accesssoftek.com> | 2020-01-15 13:54:08 +0300 |
| commit | 46d11e30ee807accefd14e0b7f306647963a39b5 (patch) | |
| tree | 217cfb9dd4c92204f27f856450c122f2542d6b24 /llvm/include | |
| parent | cbe681bd8339d3a018d25441a5f4ef9da2bd017d (diff) | |
| download | bcm5719-llvm-46d11e30ee807accefd14e0b7f306647963a39b5.tar.gz bcm5719-llvm-46d11e30ee807accefd14e0b7f306647963a39b5.zip | |
[yaml2obj/obj2yaml] - Add support for SHT_RELR sections.
The encoded sequence of Elf*_Relr entries in a SHT_RELR section looks
like [ AAAAAAAA BBBBBBB1 BBBBBBB1 ... AAAAAAAA BBBBBB1 ... ]
i.e. start with an address, followed by any number of bitmaps. The address
entry encodes 1 relocation. The subsequent bitmap entries encode up to 63(31)
relocations each, at subsequent offsets following the last address entry.
More information is here:
https://github.com/llvm-mirror/llvm/blob/master/lib/Object/ELF.cpp#L272
This patch adds a support for these sections.
Differential revision: https://reviews.llvm.org/D71872
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/ObjectYAML/ELFYAML.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/include/llvm/ObjectYAML/ELFYAML.h b/llvm/include/llvm/ObjectYAML/ELFYAML.h index c9f14589906..f87135e6a1b 100644 --- a/llvm/include/llvm/ObjectYAML/ELFYAML.h +++ b/llvm/include/llvm/ObjectYAML/ELFYAML.h @@ -138,6 +138,7 @@ struct Chunk { Group, RawContent, Relocation, + Relr, NoBits, Note, Hash, @@ -440,6 +441,17 @@ struct RelocationSection : Section { } }; +struct RelrSection : Section { + Optional<std::vector<llvm::yaml::Hex64>> Entries; + Optional<yaml::BinaryRef> Content; + + RelrSection() : Section(ChunkKind::Relr) {} + + static bool classof(const Chunk *S) { + return S->Kind == ChunkKind::Relr; + } +}; + struct SymtabShndxSection : Section { std::vector<uint32_t> Entries; |

