[PATCH] D117612: [BOLT] Update dynamic relocations from section relocations

Vladislav Khmelevsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 24 09:01:48 PST 2022


yota9 marked 7 inline comments as done.
yota9 added inline comments.


================
Comment at: bolt/include/bolt/Core/Relocation.h:56
+  /// the relocation is read from DT_JMPREL, otherwise it came from DT_RELA.
+  bool IsJmpRel = false;
+
----------------
maksfb wrote:
> Instead of introducing this flag, could we change the rewriter to classify relocation types based on the input? 
Sorry I'm not quite understand. Do you mean to classify it based on the relocation type? I did it in the first iteration of the patch, but as I said above we have a problem here: for example LD places R_AARCH64_TLSDESC in .rela.plt and lld places it in .rela.dyn, so there is not stable way to determine where did the relocation came from. Or you mean something else?


================
Comment at: bolt/test/runtime/AArch64/runtime_relocs.c:9
+// RUN: llvm-bolt %t.exe -o %t.bolt.exe -use-old-text=0 -lite=0
+// RUN: LD_PRELOAD=%t.bolt.so %t.bolt.exe
+
----------------
maksfb wrote:
> Is it necessary to run the binary?
Well, no, it is just extra check the the binary works fine. Is there any reason to create non-runnable tests? AFAIU the X86 test bot won't run aarch64 tests even if they are not runnable, or I'm wrong? 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117612



More information about the llvm-commits mailing list