Skip to content

Commit eedb1bf

Browse files
committed
Emit Content as the fallback
1 parent 94b13aa commit eedb1bf

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

llvm/lib/ObjectYAML/ELFEmitter.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,13 @@ template <class ELFT>
12731273
void ELFState<ELFT>::writeSectionContent(
12741274
Elf_Shdr &SHeader, const ELFYAML::CustomRawContentSection &Section,
12751275
ContiguousBlobAccumulator &CBA) {
1276+
if (Section.Info)
1277+
SHeader.sh_info = *Section.Info;
1278+
1279+
// If Section has Content, emit it w/o encoding other fields.
1280+
if (Section.Content)
1281+
return;
1282+
12761283
std::string Storage = Section.encode();
12771284
SHeader.sh_size = Storage.size();
12781285
CBA.write(Storage.data(), Storage.size());

0 commit comments

Comments
 (0)