[lld] r296475 - [ELF] - Do not set flags for CopyRelSection. NFC.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 28 06:22:16 PST 2017
Author: grimar
Date: Tue Feb 28 08:22:15 2017
New Revision: 296475
URL: http://llvm.org/viewvc/llvm-project?rev=296475&view=rev
Log:
[ELF] - Do not set flags for CopyRelSection. NFC.
It does not make sense. Them added either to
Out::BssRelRo or Out::Bss, which are always RW.
Modified:
lld/trunk/ELF/SyntheticSections.cpp
Modified: lld/trunk/ELF/SyntheticSections.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/SyntheticSections.cpp?rev=296475&r1=296474&r2=296475&view=diff
==============================================================================
--- lld/trunk/ELF/SyntheticSections.cpp (original)
+++ lld/trunk/ELF/SyntheticSections.cpp Tue Feb 28 08:22:15 2017
@@ -371,10 +371,7 @@ template <class ELFT>
CopyRelSection<ELFT>::CopyRelSection(bool ReadOnly, uintX_t AddrAlign, size_t S)
: SyntheticSection(SHF_ALLOC, SHT_NOBITS, AddrAlign,
ReadOnly ? ".bss.rel.ro" : ".bss"),
- Size(S) {
- if (!ReadOnly)
- this->Flags |= SHF_WRITE;
-}
+ Size(S) {}
template <class ELFT>
void BuildIdSection<ELFT>::writeBuildId(ArrayRef<uint8_t> Buf) {
More information about the llvm-commits
mailing list