@@ -545,14 +545,6 @@ static void
545545handleAArch64BAAndGnuProperties (ObjFile<ELFT> *file, Ctx &ctx, bool hasGP,
546546 const AArch64BuildAttrSubsections &baInfo,
547547 const GnuPropertiesInfo &gpInfo) {
548-
549- auto serializeUnsigned = [](unsigned valueLow, unsigned valueHigh) {
550- std::array<uint8_t , 16 > arr;
551- support::endian::write64<ELFT::Endianness>(arr.data (), valueLow);
552- support::endian::write64<ELFT::Endianness>(arr.data () + 8 , valueHigh);
553- return arr;
554- };
555-
556548 if (hasGP) {
557549 // Check for data mismatch
558550 if (!gpInfo.aarch64PauthAbiCoreInfo .empty ()) {
@@ -585,8 +577,14 @@ handleAArch64BAAndGnuProperties(ObjFile<ELFT> *file, Ctx &ctx, bool hasGP,
585577 // Unlike AArch64 Build Attributes, GNU properties does not give a way to
586578 // distinguish between no-value given to value of '0' given.
587579 if (baInfo.Pauth .TagPlatform || baInfo.Pauth .TagSchema ) {
588- file->aarch64PauthAbiCoreInfoStorage =
589- serializeUnsigned (baInfo.Pauth .TagPlatform , baInfo.Pauth .TagSchema );
580+ file->aarch64PauthAbiCoreInfoStorage = [&] {
581+ std::array<uint8_t , 16 > arr;
582+ support::endian::write64<ELFT::Endianness>(arr.data (),
583+ baInfo.Pauth .TagPlatform );
584+ support::endian::write64<ELFT::Endianness>(arr.data () + 8 ,
585+ baInfo.Pauth .TagSchema );
586+ return arr;
587+ }();
590588 file->aarch64PauthAbiCoreInfo = file->aarch64PauthAbiCoreInfoStorage ;
591589 }
592590 file->andFeatures = baInfo.AndFeatures ;
0 commit comments