[PATCH] D30627: [ELF] Properly handle .eh_frame in linker scripts
Petr Hosek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 17:49:44 PST 2017
phosek 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));
----------------
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.
================
Comment at: ELF/Writer.cpp:935-938
+ if (!Config->Relocatable) {
+ for (EhInputSection<ELFT> *ES : In<ELFT>::EhFrame->Sections)
+ Fn(*ES);
+ }
----------------
ruiu wrote:
> What is this?
To process `.eh_frame` relocations.
Repository:
rL LLVM
https://reviews.llvm.org/D30627
More information about the llvm-commits
mailing list