Don't worry about dropping SHF_MERGE.

Now that it doesn't impact which sections are merged, this is not a
problem.

llvm-svn: 294054
This commit is contained in:
Rafael Espindola 2017-02-03 21:50:40 +00:00
parent 939f6b0167
commit c06f54122e
2 changed files with 2 additions and 7 deletions

View File

@ -76,13 +76,6 @@ InputSectionBase<ELFT>::InputSectionBase(elf::ObjectFile<ELFT> *File,
if (V > UINT32_MAX)
fatal(toString(File) + ": section sh_addralign is too large");
Alignment = V;
// If it is not a mergeable section, overwrite the flag so that the flag
// is consistent with the class. This inconsistency could occur when
// string merging is disabled using -O0 flag.
if (!Config->Relocatable && !isa<MergeInputSection<ELFT>>(this) &&
!isa<SyntheticSection<ELFT>>(this))
this->Flags &= ~(SHF_MERGE | SHF_STRINGS);
}
template <class ELFT>

View File

@ -61,6 +61,8 @@ zed:
// NOMERGE-NEXT: Type: SHT_PROGBITS
// NOMERGE-NEXT: Flags [
// NOMERGE-NEXT: SHF_ALLOC
// NOMERGE-NEXT: SHF_MERGE
// NOMERGE-NEXT: SHF_STRINGS
// NOMERGE-NEXT: ]
// NOMERGE-NEXT: Address: 0x1C8
// NOMERGE-NEXT: Offset: 0x1C8