@@ -348,9 +348,9 @@ template <class ELFT> void ELFFileBase::init() {
348
348
349
349
// Initialize trivial attributes.
350
350
const ELFFile<ELFT> &obj = getObj<ELFT>();
351
- emachine = obj.getHeader ()-> e_machine ;
352
- osabi = obj.getHeader ()-> e_ident [llvm::ELF::EI_OSABI];
353
- abiVersion = obj.getHeader ()-> e_ident [llvm::ELF::EI_ABIVERSION];
351
+ emachine = obj.getHeader (). e_machine ;
352
+ osabi = obj.getHeader (). e_ident [llvm::ELF::EI_OSABI];
353
+ abiVersion = obj.getHeader (). e_ident [llvm::ELF::EI_ABIVERSION];
354
354
355
355
ArrayRef<Elf_Shdr> sections = CHECK (obj.sections (), this );
356
356
@@ -378,7 +378,7 @@ template <class ELFT> void ELFFileBase::init() {
378
378
template <class ELFT >
379
379
uint32_t ObjFile<ELFT>::getSectionIndex(const Elf_Sym &sym) const {
380
380
return CHECK (
381
- this ->getObj ().getSectionIndex (& sym, getELFSyms<ELFT>(), shndxTable),
381
+ this ->getObj ().getSectionIndex (sym, getELFSyms<ELFT>(), shndxTable),
382
382
this );
383
383
}
384
384
@@ -566,7 +566,7 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats) {
566
566
567
567
if (sec.sh_type == ELF::SHT_LLVM_CALL_GRAPH_PROFILE)
568
568
cgProfile =
569
- check (obj.template getSectionContentsAsArray <Elf_CGProfile>(& sec));
569
+ check (obj.template getSectionContentsAsArray <Elf_CGProfile>(sec));
570
570
571
571
// SHF_EXCLUDE'ed sections are discarded by the linker. However,
572
572
// if -r is given, we'll let the final link discard such sections.
@@ -595,7 +595,7 @@ void ObjFile<ELFT>::initializeSections(bool ignoreComdats) {
595
595
596
596
597
597
ArrayRef<Elf_Word> entries =
598
- CHECK (obj.template getSectionContentsAsArray <Elf_Word>(& sec), this );
598
+ CHECK (obj.template getSectionContentsAsArray <Elf_Word>(sec), this );
599
599
if (entries.empty ())
600
600
fatal (toString (this ) + " : empty SHT_GROUP" );
601
601
@@ -870,7 +870,7 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &sec) {
870
870
871
871
if (config->emachine == EM_ARM && sec.sh_type == SHT_ARM_ATTRIBUTES) {
872
872
ARMAttributeParser attributes;
873
- ArrayRef<uint8_t > contents = check (this ->getObj ().getSectionContents (& sec));
873
+ ArrayRef<uint8_t > contents = check (this ->getObj ().getSectionContents (sec));
874
874
if (Error e = attributes.parse (contents, config->ekind == ELF32LEKind
875
875
? support::little
876
876
: support::big)) {
@@ -894,7 +894,7 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &sec) {
894
894
895
895
if (config->emachine == EM_RISCV && sec.sh_type == SHT_RISCV_ATTRIBUTES) {
896
896
RISCVAttributeParser attributes;
897
- ArrayRef<uint8_t > contents = check (this ->getObj ().getSectionContents (& sec));
897
+ ArrayRef<uint8_t > contents = check (this ->getObj ().getSectionContents (sec));
898
898
if (Error e = attributes.parse (contents, support::little)) {
899
899
auto *isec = make<InputSection>(*this , sec, name);
900
900
warn (toString (isec) + " : " + llvm::toString (std::move (e)));
@@ -919,7 +919,7 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &sec) {
919
919
if (config->relocatable )
920
920
break ;
921
921
ArrayRef<char > data =
922
- CHECK (this ->getObj ().template getSectionContentsAsArray <char >(& sec), this );
922
+ CHECK (this ->getObj ().template getSectionContentsAsArray <char >(sec), this );
923
923
if (!data.empty () && data.back () != ' \0 ' ) {
924
924
error (toString (this ) +
925
925
" : corrupted dependent libraries section (unterminated string): " +
@@ -959,12 +959,12 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &sec) {
959
959
" : multiple relocation sections to one section are not supported" );
960
960
961
961
if (sec.sh_type == SHT_RELA) {
962
- ArrayRef<Elf_Rela> rels = CHECK (getObj ().relas (& sec), this );
962
+ ArrayRef<Elf_Rela> rels = CHECK (getObj ().relas (sec), this );
963
963
target->firstRelocation = rels.begin ();
964
964
target->numRelocations = rels.size ();
965
965
target->areRelocsRela = true ;
966
966
} else {
967
- ArrayRef<Elf_Rel> rels = CHECK (getObj ().rels (& sec), this );
967
+ ArrayRef<Elf_Rel> rels = CHECK (getObj ().rels (sec), this );
968
968
target->firstRelocation = rels.begin ();
969
969
target->numRelocations = rels.size ();
970
970
target->areRelocsRela = false ;
@@ -1065,7 +1065,7 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(const Elf_Shdr &sec) {
1065
1065
1066
1066
template <class ELFT >
1067
1067
StringRef ObjFile<ELFT>::getSectionName(const Elf_Shdr &sec) {
1068
- return CHECK (getObj ().getSectionName (& sec, sectionStringTable), this );
1068
+ return CHECK (getObj ().getSectionName (sec, sectionStringTable), this );
1069
1069
}
1070
1070
1071
1071
// Initialize this->Symbols. this->Symbols is a parallel array as
@@ -1279,7 +1279,7 @@ std::vector<uint32_t> SharedFile::parseVerneed(const ELFFile<ELFT> &obj,
1279
1279
if (!sec)
1280
1280
return {};
1281
1281
std::vector<uint32_t > verneeds;
1282
- ArrayRef<uint8_t > data = CHECK (obj.getSectionContents (sec), this );
1282
+ ArrayRef<uint8_t > data = CHECK (obj.getSectionContents (* sec), this );
1283
1283
const uint8_t *verneedBuf = data.begin ();
1284
1284
for (unsigned i = 0 ; i != sec->sh_info ; ++i) {
1285
1285
if (verneedBuf + sizeof (typename ELFT::Verneed) > data.end ())
@@ -1355,7 +1355,7 @@ template <class ELFT> void SharedFile::parse() {
1355
1355
continue ;
1356
1356
case SHT_DYNAMIC:
1357
1357
dynamicTags =
1358
- CHECK (obj.template getSectionContentsAsArray <Elf_Dyn>(& sec), this );
1358
+ CHECK (obj.template getSectionContentsAsArray <Elf_Dyn>(sec), this );
1359
1359
break ;
1360
1360
case SHT_GNU_versym:
1361
1361
versymSec = &sec;
@@ -1414,7 +1414,7 @@ template <class ELFT> void SharedFile::parse() {
1414
1414
std::vector<uint16_t > versyms (size, VER_NDX_GLOBAL);
1415
1415
if (versymSec) {
1416
1416
ArrayRef<Elf_Versym> versym =
1417
- CHECK (obj.template getSectionContentsAsArray <Elf_Versym>(versymSec),
1417
+ CHECK (obj.template getSectionContentsAsArray <Elf_Versym>(* versymSec),
1418
1418
this )
1419
1419
.slice (firstGlobal);
1420
1420
for (size_t i = 0 ; i < size; ++i)
0 commit comments