diff options
author | Rui Ueyama <ruiu@google.com> | 2016-07-15 04:57:44 +0000 |
---|---|---|
committer | Rui Ueyama <ruiu@google.com> | 2016-07-15 04:57:44 +0000 |
commit | 1b60129d4e2599e06d30002c73d3568960cda0d4 (patch) | |
tree | ace67e529089690df87740620465d839f4689635 | |
parent | 5dcba7458e9360e61d37bd77c871339716814d55 (diff) |
Update comments.
git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@275530 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | ELF/InputFiles.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ELF/InputFiles.cpp b/ELF/InputFiles.cpp index a05007ea6..4614e9ca0 100644 --- a/ELF/InputFiles.cpp +++ b/ELF/InputFiles.cpp @@ -308,10 +308,12 @@ elf::ObjectFile<ELFT>::createInputSection(const Elf_Shdr &Sec) { } } - // We dont need special handling of .eh_frame sections if relocatable - // output was choosen. Proccess them as usual input sections. - if (!Config->Relocatable && Name == ".eh_frame") + // The linker merges EH (exception handling) frames and creates a + // .eh_frame_hdr section for runtime. So we handle them with a special + // class. For relocatable outputs, they are just passed through. + if (Name == ".eh_frame" && !Config->Relocatable) return new (EHAlloc.Allocate()) EhInputSection<ELFT>(this, &Sec); + if (shouldMerge<ELFT>(Sec)) return new (MAlloc.Allocate()) MergeInputSection<ELFT>(this, &Sec); return new (IAlloc.Allocate()) InputSection<ELFT>(this, &Sec); |