diff options
Diffstat (limited to 'lld/ELF/OutputSections.h')
-rw-r--r-- | lld/ELF/OutputSections.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lld/ELF/OutputSections.h b/lld/ELF/OutputSections.h index bf799e27e02..fedda160f70 100644 --- a/lld/ELF/OutputSections.h +++ b/lld/ELF/OutputSections.h @@ -812,6 +812,12 @@ private: llvm::SmallDenseMap<Key, OutputSectionBase<ELFT> *> Map; }; +template <class ELFT> uint64_t getHeaderSize() { + if (Config->OFormatBinary) + return 0; + return Out<ELFT>::ElfHeader->getSize() + Out<ELFT>::ProgramHeaders->getSize(); +} + template <class ELFT> BuildIdSection<ELFT> *Out<ELFT>::BuildId; template <class ELFT> DynamicSection<ELFT> *Out<ELFT>::Dynamic; template <class ELFT> EhFrameHeader<ELFT> *Out<ELFT>::EhFrameHdr; |