@@ -1096,14 +1096,7 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
10961096 std::map<const MCSymbol *, std::vector<const MCSectionELF *>> GroupMembers;
10971097
10981098 // Write out the ELF header ...
1099- // EVM local begin
1100- // HACK!!! For EVM target we don't need the whole EFL file,
1101- // but just its .text section. The natural way would be to extract
1102- // it using objdump utility, but design of our FE doesn't admit
1103- // usage of any other tool besides the BE itslef.
1104- if (!Ctx.getTargetTriple ().isEVM ())
1105- writeHeader (Asm);
1106- // EVM local end
1099+ writeHeader (Asm);
11071100
11081101 // ... then the sections ...
11091102 SectionOffsetsTy SectionOffsets;
@@ -1120,14 +1113,6 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
11201113 const uint64_t SecStart = align (Section.getAlign ());
11211114
11221115 const MCSymbolELF *SignatureSymbol = Section.getGroup ();
1123- // EVM local begin
1124- if (Ctx.getTargetTriple ().isEVM ()) {
1125- if (Section.getName () == " .text" )
1126- writeSectionData (Asm, Section, Layout);
1127- continue ;
1128- }
1129- // EVM local end
1130-
11311116 writeSectionData (Asm, Section, Layout);
11321117
11331118 uint64_t SecEnd = W.OS .tell ();
@@ -1160,11 +1145,6 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
11601145 OWriter.TargetObjectWriter ->addTargetSectionFlags (Ctx, Section);
11611146 }
11621147
1163- // EVM local begin
1164- if (Ctx.getTargetTriple ().isEVM ())
1165- return W.OS .tell () - StartOffset;
1166- // EVM local end
1167-
11681148 for (MCSectionELF *Group : Groups) {
11691149 // Remember the offset into the file for this section.
11701150 const uint64_t SecStart = align (Group->getAlign ());
0 commit comments