diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2019-02-28 23:11:35 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-02-28 23:11:35 +0000 |
commit | 7fb9eabda56e02dce024bf92590d97c038700f7d (patch) | |
tree | ceb61baa0131264d9d0c249c6ed7aef69b0817fe /lld/ELF/OutputSections.cpp | |
parent | 701593f1dbff225e39f8a25cfd2bfbc3f246f296 (diff) | |
download | bcm5719-llvm-7fb9eabda56e02dce024bf92590d97c038700f7d.tar.gz bcm5719-llvm-7fb9eabda56e02dce024bf92590d97c038700f7d.zip |
ELF: Write .eh_frame_hdr explicitly after writing .eh_frame.
This lets us remove the special case from Writer::writeSections(), and also
fixes a bug where .eh_frame_hdr isn't necessarily written in the correct
order if a linker script moves .eh_frame and .eh_frame_hdr into the same
output section.
Differential Revision: https://reviews.llvm.org/D58795
llvm-svn: 355153
Diffstat (limited to 'lld/ELF/OutputSections.cpp')
-rw-r--r-- | lld/ELF/OutputSections.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lld/ELF/OutputSections.cpp b/lld/ELF/OutputSections.cpp index 6c40e45b791..96be5a1b4d3 100644 --- a/lld/ELF/OutputSections.cpp +++ b/lld/ELF/OutputSections.cpp @@ -30,6 +30,7 @@ using namespace llvm::ELF; using namespace lld; using namespace lld::elf; +uint8_t *Out::BufferStart; uint8_t Out::First; PhdrEntry *Out::TlsPhdr; OutputSection *Out::ElfHeader; @@ -222,8 +223,6 @@ template <class ELFT> void OutputSection::writeTo(uint8_t *Buf) { if (Type == SHT_NOBITS) return; - Loc = Buf; - // If -compress-debug-section is specified and if this is a debug seciton, // we've already compressed section contents. If that's the case, // just write it down. |