[all-commits] [llvm/llvm-project] c335ac: [ELF] --pack-dyn-relocs=android+relr: place IRELAT...

Fangrui Song via All-commits all-commits at lists.llvm.org
Wed Mar 27 09:47:38 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c335accb07c0cfa4bd7f47edc94c9005692edfcc
      https://github.com/llvm/llvm-project/commit/c335accb07c0cfa4bd7f47edc94c9005692edfcc
  Author: Fangrui Song <i at maskray.me>
  Date:   2024-03-27 (Wed, 27 Mar 2024)

  Changed paths:
    M lld/ELF/Relocations.cpp
    A lld/test/ELF/pack-dyn-relocs-ifunc.s

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

Current Bionic processes relocations in this order:

* DT_ANDROID_REL[A]
* DT_RELR
* DT_REL[A]
* DT_JMPREL

If an IRELATIVE relocation is in DT_ANDROID_REL[A], it would read
unrelocated (incorrect) global variables associated with RELR when
--pack-dyn-relocs=android+relr is enabled. Work around this by placing
IRELATIVE in .rel[a].plt (DT_JMPREL).

Link: https://r.android.com/3014185



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list