[lld] [lld][AArch64][ELF][PAC] Support AUTH relocations and AUTH ELF marking (PR #72714)

Daniil Kovalev via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 8 02:49:01 PST 2024


================
@@ -591,15 +603,15 @@ class AndroidPackedRelocationSection final : public RelocationBaseSection {
 };
 
 struct RelativeReloc {
-  uint64_t getOffset() const { return inputSec->getVA(offsetInSec); }
+  uint64_t getOffset() const { return inputSec->getVA(reloc->offset); }
 
   const InputSectionBase *inputSec;
-  uint64_t offsetInSec;
+  Relocation *reloc;
----------------
kovdan01 wrote:

Ah, thanks. Instead of storing pointer to `Relocation` in `RelativeReloc`, changed that to storing its index in the vector. This does not become invalidated when new relocs are appended to the vector and it becomes resized. See b215b0d60ac0c2ac29aeb318da7c95725be6ef86


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


More information about the llvm-commits mailing list