[lld] [ELF] --pack-dyn-relocs=android+relr: place IRELATIVE in .rela.plt (PR #86751)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 17:31:42 PDT 2024


================
@@ -1659,10 +1659,16 @@ static bool handleNonPreemptibleIfunc(Symbol &sym, uint16_t flags) {
   // original section/value pairs. For non-GOT non-PLT relocation case below, we
   // may alter section/value, so create a copy of the symbol to make
   // section/value fixed.
+  //
+  // Prior to Android V, there was a bug that caused RELR relocations to be
+  // applied after packed relocations. This meant that resolvers referenced
+  // IRELATIVE relocations in the packed relocation section could not read
----------------
MaskRay wrote:

Switched to

> This meant that resolvers referenced
  // IRELATIVE relocations in the packed relocation section would read
  // unrelocated globals with RELR relocations when
  // --pack-relative-relocs=android+relr is enabled.

hope it is clearer

https://github.com/llvm/llvm-project/pull/86751


More information about the llvm-commits mailing list