File tree 1 file changed +3
-2
lines changed
llvm/tools/llvm-objcopy/ELF
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1187,7 +1187,7 @@ template <class ELFT>
1187
1187
Error ELFSectionWriter<ELFT>::visit(const GroupSection &Sec) {
1188
1188
ELF::Elf32_Word *Buf =
1189
1189
reinterpret_cast <ELF::Elf32_Word *>(Out.getBufferStart () + Sec.Offset );
1190
- * Buf++ = Sec.FlagWord ;
1190
+ support::endian::write32<ELFT::TargetEndianness>( Buf++, Sec.FlagWord ) ;
1191
1191
for (SectionBase *S : Sec.GroupMembers )
1192
1192
support::endian::write32<ELFT::TargetEndianness>(Buf++, S->Index );
1193
1193
return Error::success ();
@@ -1517,7 +1517,8 @@ Error ELFBuilder<ELFT>::initGroupSection(GroupSection *GroupSec) {
1517
1517
reinterpret_cast <const ELF::Elf32_Word *>(GroupSec->Contents .data ());
1518
1518
const ELF::Elf32_Word *End =
1519
1519
Word + GroupSec->Contents .size () / sizeof (ELF::Elf32_Word);
1520
- GroupSec->setFlagWord (*Word++);
1520
+ GroupSec->setFlagWord (
1521
+ support::endian::read32<ELFT::TargetEndianness>(Word++));
1521
1522
for (; Word != End; ++Word) {
1522
1523
uint32_t Index = support::endian::read32<ELFT::TargetEndianness>(Word);
1523
1524
Expected<SectionBase *> Sec = SecTable.getSection (
You can’t perform that action at this time.
0 commit comments