summaryrefslogtreecommitdiff
path: root/lld/ELF/Writer.h
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-05-04 19:34:17 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-05-04 19:34:17 +0000
commit21e925b5a76739ff0b0724fd10368e5391f423e2 (patch)
treef556114ba1de48686f4e4cad235949dda5be37f3 /lld/ELF/Writer.h
parentd4abd73266c310c493cf5413af46e63f7618701f (diff)
Simplify the header allocation.
In the non linker script case we would try very early to find out if we could allocate the headers. Failing to do that would add extra alignment to the first ro section, since we would set PageAlign thinking it was the first section in the PT_LOAD. In the linker script case the header allocation must be done in the end, causing some duplication. We now tentatively add the headers to the first PT_LOAD and if it turns out they don't fit, remove them. With this we only need to allocate the headers in one place in the code.
Diffstat (limited to 'lld/ELF/Writer.h')
-rw-r--r--lld/ELF/Writer.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/lld/ELF/Writer.h b/lld/ELF/Writer.h
index a669e42ef20..8b965f7bedd 100644
--- a/lld/ELF/Writer.h
+++ b/lld/ELF/Writer.h
@@ -49,9 +49,6 @@ struct PhdrEntry {
llvm::StringRef getOutputSectionName(llvm::StringRef Name);
-bool allocateHeaders(std::vector<PhdrEntry> &, llvm::ArrayRef<OutputSection *>,
- uint64_t Min);
-
template <class ELFT> uint32_t getMipsEFlags();
uint8_t getMipsFpAbiFlag(uint8_t OldFlag, uint8_t NewFlag,