[PATCH] D100490: [ELF] Check the Elf_Rel addends for dynamic relocations

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 15 03:00:58 PDT 2021


arichardson added a comment.

In D100490#2690103 <https://reviews.llvm.org/D100490#2690103>, @MaskRay wrote:

> The getImplicitAddend enhancement (`-z rel`) can be moved to a separate patch, but the dynamic only relocation types (JUMP_SLOT, RELATIVE, IRELATIVE, etc) should be removed since they can't be input.
>
> useSymVA is subtle and I need time to grok it. I wonder whether the new member can improve https://bugs.llvm.org/show_bug.cgi?id=47009 TLSDESC for -z rel?

Yes, it appears this new error triggers for the test case from that bug:

  arch64-tlsdesc-rel.s.tmp-rel.so:(.got+0x10): wrote incorrect addend for dynamic relocation: value is 0x0 but expected 0x4 for R_AARCH64_TLSDESC against y at 0x203C8

Will update to handle that case.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100490/new/

https://reviews.llvm.org/D100490



More information about the llvm-commits mailing list