@@ -2770,25 +2770,22 @@ template <class ELFT> void DebugNamesSection<ELFT>::writeTo(uint8_t *buf) {
2770
2770
// Write out bytes for merged section.
2771
2771
2772
2772
// Write the header.
2773
- endian::write32<ELFT::TargetEndianness>(buf + 0 , mergedHdr.UnitLength );
2774
- endian::write16<ELFT::TargetEndianness>(buf + 4 , mergedHdr.Version );
2775
- endian::write32<ELFT::TargetEndianness>(buf + 8 , mergedHdr.CompUnitCount );
2776
- endian::write32<ELFT::TargetEndianness>(buf + 12 ,
2777
- mergedHdr.LocalTypeUnitCount );
2778
- endian::write32<ELFT::TargetEndianness>(buf + 16 ,
2779
- mergedHdr.ForeignTypeUnitCount );
2780
- endian::write32<ELFT::TargetEndianness>(buf + 20 , mergedHdr.BucketCount );
2781
- endian::write32<ELFT::TargetEndianness>(buf + 24 , mergedHdr.NameCount );
2782
- endian::write32<ELFT::TargetEndianness>(buf + 28 , mergedHdr.AbbrevTableSize );
2783
- endian::write32<ELFT::TargetEndianness>(buf + 32 ,
2784
- mergedHdr.AugmentationStringSize );
2773
+ endian::write32<ELFT::Endianness>(buf + 0 , mergedHdr.UnitLength );
2774
+ endian::write16<ELFT::Endianness>(buf + 4 , mergedHdr.Version );
2775
+ endian::write32<ELFT::Endianness>(buf + 8 , mergedHdr.CompUnitCount );
2776
+ endian::write32<ELFT::Endianness>(buf + 12 , mergedHdr.LocalTypeUnitCount );
2777
+ endian::write32<ELFT::Endianness>(buf + 16 , mergedHdr.ForeignTypeUnitCount );
2778
+ endian::write32<ELFT::Endianness>(buf + 20 , mergedHdr.BucketCount );
2779
+ endian::write32<ELFT::Endianness>(buf + 24 , mergedHdr.NameCount );
2780
+ endian::write32<ELFT::Endianness>(buf + 28 , mergedHdr.AbbrevTableSize );
2781
+ endian::write32<ELFT::Endianness>(buf + 32 , mergedHdr.AugmentationStringSize );
2785
2782
buf += 36 ;
2786
2783
memcpy (buf, mergedHdr.AugmentationString .c_str (), 8 );
2787
2784
buf += 8 ;
2788
2785
2789
2786
// Write the CU list.
2790
2787
for (uint32_t offset : mergedCuOffsets) {
2791
- endian::write32<ELFT::TargetEndianness >(buf + 0 , offset);
2788
+ endian::write32<ELFT::Endianness >(buf + 0 , offset);
2792
2789
buf += 4 ;
2793
2790
}
2794
2791
@@ -2807,7 +2804,7 @@ template <class ELFT> void DebugNamesSection<ELFT>::writeTo(uint8_t *buf) {
2807
2804
uint32_t idx = 1 ;
2808
2805
for (const auto &bucket : bucketList) {
2809
2806
if (!bucket.empty ())
2810
- endian::write32<ELFT::TargetEndianness >(buf + 0 , idx);
2807
+ endian::write32<ELFT::Endianness >(buf + 0 , idx);
2811
2808
idx += bucket.size ();
2812
2809
buf += 4 ;
2813
2810
}
@@ -2816,21 +2813,20 @@ template <class ELFT> void DebugNamesSection<ELFT>::writeTo(uint8_t *buf) {
2816
2813
for (const auto &bucket : bucketList) {
2817
2814
for (const auto &entry : bucket) {
2818
2815
uint32_t hashValue = entry->hashValue ;
2819
- endian::write32<ELFT::TargetEndianness >(buf + 0 , hashValue);
2816
+ endian::write32<ELFT::Endianness >(buf + 0 , hashValue);
2820
2817
buf += 4 ;
2821
2818
}
2822
2819
}
2823
2820
2824
2821
// Write the string offsets.
2825
2822
for (const auto &entry : mergedEntries) {
2826
- endian::write32<ELFT::TargetEndianness>(buf + 0 ,
2827
- entry.relocatedEntryOffset );
2823
+ endian::write32<ELFT::Endianness>(buf + 0 , entry.relocatedEntryOffset );
2828
2824
buf += 4 ;
2829
2825
}
2830
2826
2831
2827
// Write the entry offsets.
2832
2828
for (const auto &entry : mergedEntries) {
2833
- endian::write32<ELFT::TargetEndianness >(buf + 0 , entry.entryOffset );
2829
+ endian::write32<ELFT::Endianness >(buf + 0 , entry.entryOffset );
2834
2830
buf += 4 ;
2835
2831
}
2836
2832
@@ -2842,7 +2838,7 @@ template <class ELFT> void DebugNamesSection<ELFT>::writeTo(uint8_t *buf) {
2842
2838
buf += encodeULEB128 (attr.Index , buf);
2843
2839
buf += encodeULEB128 (attr.Form , buf);
2844
2840
}
2845
- endian::write16<ELFT::TargetEndianness >(buf + 0 , 0 ); // attribute sentinels.
2841
+ endian::write16<ELFT::Endianness >(buf + 0 , 0 ); // attribute sentinels.
2846
2842
buf += 2 ;
2847
2843
}
2848
2844
*buf++ = 0 ; // abbrev table sentinel
@@ -2853,7 +2849,7 @@ template <class ELFT> void DebugNamesSection<ELFT>::writeTo(uint8_t *buf) {
2853
2849
for (const auto &entry : stringEntry.indexEntries ) {
2854
2850
buf += encodeULEB128 (entry->abbrevCode , buf);
2855
2851
for (const auto &value : entry->attrValues ) {
2856
- endian::write32<ELFT::TargetEndianness >(buf + 0 , value.attrValue );
2852
+ endian::write32<ELFT::Endianness >(buf + 0 , value.attrValue );
2857
2853
buf += value.attrSize ;
2858
2854
}
2859
2855
}
0 commit comments