[PATCH] D30627: [ELF] Properly handle .eh_frame in linker scripts

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 7 17:56:09 PST 2017


ruiu added inline comments.


================
Comment at: ELF/SyntheticSections.cpp:507-508
   Sections.push_back(Sec);
+  std::move(Sec->DependentSections.begin(), Sec->DependentSections.end(),
+            std::back_inserter(DependentSections));
 
----------------
phosek wrote:
> ruiu wrote:
> > What is this for?
> `.eh_frame` can have relocations, so we need to ensure that if the `EhFrameSection` gets GC'ed, `.rel.eh_frame`/`.rela.eh_frame` gets GC'ed as well.
But when the control reached Writer::run function, all garbage has already been gc'ed, no?


Repository:
  rL LLVM

https://reviews.llvm.org/D30627





More information about the llvm-commits mailing list