[AArch64][ELF][llvm-readobj] Add support for BTI and PAC dynamic tags
authorPeter Smith <peter.smith@linaro.org>
Tue, 4 Jun 2019 11:44:33 +0000 (11:44 +0000)
committerPeter Smith <peter.smith@linaro.org>
Tue, 4 Jun 2019 11:44:33 +0000 (11:44 +0000)
commit49d7221f7195d1254366e9eb88a2d610a2277e23
tree6b053d4dfcdba2f9d6cffb5e8faf07325ec868a0
parentc73c10a9bf1d0fbfb3a78342c64a57267902119e
[AArch64][ELF][llvm-readobj] Add support for BTI and PAC dynamic tags

ELF for the 64-bit Arm Architecture defines two processor-specific dynamic
tags:
DT_AARCH64_BTI_PLT 0x70000001, d_val
DT_AARCH64_PAC_PLT 0x70000003, d_val

These presence of these tags indicate that PLT sequences have been
protected using Branch Target Identification and Pointer Authentication
respectively. The presence of both indicates that the PLT sequences have
been protected with both Branch Target Identification and Pointer
Authentication.

This patch adds the tags and tests for llvm-readobj and yaml2obj.

As some of the processor specific dynamic tags overlap, this patch splits
them up, keeping their original default value if they were not previously
mentioned explicitly in a switch case.

Differential Revision: https://reviews.llvm.org/D62596

llvm-svn: 362493
llvm/include/llvm/BinaryFormat/DynamicTags.def
llvm/lib/Object/ELF.cpp
llvm/lib/ObjectYAML/ELFYAML.cpp
llvm/test/tools/llvm-readobj/Inputs/elf-dynamic-tags-machine-specific.yaml
llvm/test/tools/llvm-readobj/elf-dynamic-tags-machine-specific.test
llvm/test/tools/obj2yaml/dynamic-section-arch-tags.test
llvm/tools/llvm-readobj/ELFDumper.cpp