[PATCH] D62596: [AARCH64][ELF][llvm-readobj] Add support for BTI and PAC dynamic tags

Luke Cheeseman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 30 02:57:06 PDT 2019

LukeCheeseman added inline comments.

Comment at: test/tools/llvm-readobj/aarch64-bti-pac-dynamic.test:15
+CHECK-NEXT:   0x0000000070000001 AARCH64_BTI_PLT      0
+CHECK-NEXT:   0x0000000070000003 AARCH64_PAC_PLT      0x0
+CHECK-NEXT:   0x0000000000000006 SYMTAB               0x200258
peter.smith wrote:
> grimar wrote:
> > ostannard wrote:
> > > Why is the value for PAC printed as "0x0", but BTI is just "0"?
> > FWIW it is not an issue of this patch it seems.
> That is interesting, in many places in llvm-readelf the architecture specific tags are separated from each other, but in the case of printDynamicEntry they are not. So the AArch64 tags overlap with MIPS_RLD_VERSION and MIPS_ICHECKSUM. In this particular case this doesn't really matter as the value of the tag isn't important, but it may do in the future. To fix this properly will need some similar logic to isolate the cases by processor. I'll have a think.
Sounds like a similar issue to https://reviews.llvm.org/D50136. The overlapping aarch64 and sparc tags meant that the dumped attribute always came out as sparc attribute. It was arguably more of an issue there as it would dump an unrelated attribute. I wasn't too happy with the solution but there wasn't/isn't any support for target specific dumping.



More information about the llvm-commits mailing list