@@ -919,13 +919,13 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats,
919919}
920920
921921template <typename ELFT>
922- static void parseGnuPropertyNote (Ctx &ctx, uint32_t &featureAndType ,
923- ArrayRef< uint8_t > &desc, ELFFileBase *f ,
924- const uint8_t *base,
922+ static void parseGnuPropertyNote (Ctx &ctx, ELFFileBase &f ,
923+ uint32_t featureAndType ,
924+ ArrayRef< uint8_t > &desc, const uint8_t *base,
925925 ArrayRef<uint8_t > *data = nullptr ) {
926926 auto err = [&](const uint8_t *place) -> ELFSyncStream {
927927 auto diag = Err (ctx);
928- diag << f-> getName () << " :(" << " .note.gnu.property+0x"
928+ diag << &f << " :(" << " .note.gnu.property+0x"
929929 << Twine::utohexstr (place - base) << " ): " ;
930930 return diag;
931931 };
@@ -946,15 +946,15 @@ static void parseGnuPropertyNote(Ctx &ctx, uint32_t &featureAndType,
946946 // accumulate the bits set.
947947 if (size < 4 )
948948 return void (err (place) << " FEATURE_1_AND entry is too short" );
949- f-> andFeatures |= read32<ELFT::Endianness>(desc.data ());
949+ f. andFeatures |= read32<ELFT::Endianness>(desc.data ());
950950 } else if (ctx.arg .emachine == EM_AARCH64 &&
951951 type == GNU_PROPERTY_AARCH64_FEATURE_PAUTH) {
952952 // If the file being parsed is a SharedFile, we cannot pass in
953953 // the data variable as there is no InputSection to collect the
954954 // data from. As such, these are ignored. They are needed either
955955 // when loading a shared library oject.
956956 ArrayRef<uint8_t > contents = data ? *data : desc;
957- if (!f-> aarch64PauthAbiCoreInfo .empty ()) {
957+ if (!f. aarch64PauthAbiCoreInfo .empty ()) {
958958 return void (
959959 err (contents.data ())
960960 << " multiple GNU_PROPERTY_AARCH64_FEATURE_PAUTH entries are "
@@ -965,7 +965,7 @@ static void parseGnuPropertyNote(Ctx &ctx, uint32_t &featureAndType,
965965 " is invalid: expected 16 bytes, but got "
966966 << size);
967967 }
968- f-> aarch64PauthAbiCoreInfo = desc;
968+ f. aarch64PauthAbiCoreInfo = desc;
969969 }
970970
971971 // Padding is present in the note descriptor, if necessary.
@@ -1010,7 +1010,7 @@ static void readGnuProperty(Ctx &ctx, const InputSection &sec,
10101010 // Read a body of a NOTE record, which consists of type-length-value fields.
10111011 ArrayRef<uint8_t > desc = note.getDesc (sec.addralign );
10121012 const uint8_t *base = sec.content ().data ();
1013- parseGnuPropertyNote<ELFT>(ctx, featureAndType, desc, &f , base, &data);
1013+ parseGnuPropertyNote<ELFT>(ctx, f, featureAndType, desc , base, &data);
10141014
10151015 // Go to next NOTE record to look for more FEATURE_1_AND descriptions.
10161016 data = data.slice (nhdr->getSize (sec.addralign ));
@@ -1465,7 +1465,7 @@ void SharedFile::parseGnuAndFeatures(const uint8_t *base,
14651465
14661466 // Read a body of a NOTE record, which consists of type-length-value fields.
14671467 ArrayRef<uint8_t > desc = note.getDesc (headers[i].p_align );
1468- parseGnuPropertyNote<ELFT>(ctx, featureAndType, desc, this , base);
1468+ parseGnuPropertyNote<ELFT>(ctx, * this , featureAndType, desc , base);
14691469 }
14701470}
14711471
0 commit comments