[PATCH] D57245: [PPC64] Sort .toc sections accessed with small code model relocs close to the .got part 2

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 30 10:50:13 PST 2019


sfertile marked an inline comment as done.
sfertile added inline comments.


================
Comment at: ELF/Arch/PPC64.cpp:101
 
-bool elf::isPPC64SmallCodeModelReloc(RelType Type) {
-  // List is not yet complete, at the very least the got based tls related
-  // relocations need to be added, and we need to determine how the section
-  // sorting interacts with the thread pointer and dynamic thread pointer
-  // relative tls relocations.
-  return Type == R_PPC64_GOT16 || Type == R_PPC64_TOC16 ||
-         Type == R_PPC64_TOC16_DS;
+// For lld we really only need to identify objects that use the toc based small
+// code model relocs for the .toc section sorting and can ignore the got based
----------------
ruiu wrote:
> Could you update the comment a bit so that it gives the big picture about what this function does? Looks like this comment is slightly too detailed and might not be understood if you already know what this is for.
The previous comment was a bit out of place here. It had a lot of PPC specific details so I thought I should bury it in the PPC target. I've removed the specific relocations and moved the comment into scanRelocs. I think it makes sense there now as it explains why we only need to flag certain small code model relocations for the sorting (as opposed to what bfd and gold do).


Repository:
  rLLD LLVM Linker

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

https://reviews.llvm.org/D57245





More information about the llvm-commits mailing list