llvm.org GIT mirror llvm / ef592db
[llvm-readobj] Fix member functions name style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211152 91177308-0d34-0410-b5e6-96231b3b80d8 Simon Atanasyan 6 years ago
1 changed file(s) with 14 addition(s) and 14 deletion(s). Raw diff Collapse all Expand all
10391039
10401040 MipsGOTParser(const ObjectFile *Obj, StreamWriter &W) : Obj(Obj), W(W) {}
10411041
1042 void ParseGOT(const Elf_Shdr &GOTShdr);
1042 void parseGOT(const Elf_Shdr &GOTShdr);
10431043
10441044 private:
10451045 typedef typename ObjectFile::Elf_Sym_Iter Elf_Sym_Iter;
10501050 const ObjectFile *Obj;
10511051 StreamWriter &W;
10521052
1053 std::size_t GetGOTTotal(ArrayRef GOT) const;
1054 GOTIter MakeGOTIter(ArrayRef GOT, std::size_t EntryNum);
1053 std::size_t getGOTTotal(ArrayRef GOT) const;
1054 GOTIter makeGOTIter(ArrayRef GOT, std::size_t EntryNum);
10551055
10561056 bool getGOTTags(uint64_t &LocalGotNum, uint64_t &GotSym);
10571057 void printGotEntry(uint64_t GotAddr, GOTIter BeginIt, GOTIter It);
10611061 }
10621062
10631063 template
1064 void MipsGOTParser::ParseGOT(const Elf_Shdr &GOTShdr) {
1064 void MipsGOTParser::parseGOT(const Elf_Shdr &GOTShdr) {
10651065 // See "Global Offset Table" in Chapter 5 in the following document
10661066 // for detailed GOT description.
10671067 // ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
10771077 if (!getGOTTags(DtLocalGotNum, DtGotSym))
10781078 return;
10791079
1080 if (DtLocalGotNum > GetGOTTotal(*GOT)) {
1080 if (DtLocalGotNum > getGOTTotal(*GOT)) {
10811081 W.startLine() << "MIPS_LOCAL_GOTNO exceeds a number of GOT entries.\n";
10821082 return;
10831083 }
10931093
10941094 std::size_t GlobalGotNum = DynSymTotal - DtGotSym;
10951095
1096 if (DtLocalGotNum + GlobalGotNum > GetGOTTotal(*GOT)) {
1096 if (DtLocalGotNum + GlobalGotNum > getGOTTotal(*GOT)) {
10971097 W.startLine() << "Number of global GOT entries exceeds the size of GOT.\n";
10981098 return;
10991099 }
11001100
1101 GOTIter GotBegin = MakeGOTIter(*GOT, 0);
1102 GOTIter GotLocalEnd = MakeGOTIter(*GOT, DtLocalGotNum);
1101 GOTIter GotBegin = makeGOTIter(*GOT, 0);
1102 GOTIter GotLocalEnd = makeGOTIter(*GOT, DtLocalGotNum);
11031103 GOTIter It = GotBegin;
11041104
11051105 DictScope GS(W, "Primary GOT");
11301130 {
11311131 ListScope GS(W, "Global entries");
11321132
1133 GOTIter GotGlobalEnd = MakeGOTIter(*GOT, DtLocalGotNum + GlobalGotNum);
1133 GOTIter GotGlobalEnd = makeGOTIter(*GOT, DtLocalGotNum + GlobalGotNum);
11341134 Elf_Sym_Iter GotDynSym = DynSymBegin + DtGotSym;
11351135 for (; It != GotGlobalEnd; ++It) {
11361136 DictScope D(W, "Entry");
11381138 }
11391139 }
11401140
1141 std::size_t SpecGotNum = GetGOTTotal(*GOT) - DtLocalGotNum - GlobalGotNum;
1141 std::size_t SpecGotNum = getGOTTotal(*GOT) - DtLocalGotNum - GlobalGotNum;
11421142 W.printNumber("Number of TLS and multi-GOT entries", uint64_t(SpecGotNum));
11431143 }
11441144
11451145 template
1146 std::size_t MipsGOTParser::GetGOTTotal(ArrayRef GOT) const {
1146 std::size_t MipsGOTParser::getGOTTotal(ArrayRef GOT) const {
11471147 return GOT.size() / sizeof(GOTEntry);
11481148 }
11491149
11501150 template
11511151 typename MipsGOTParser::GOTIter
1152 MipsGOTParser::MakeGOTIter(ArrayRef GOT, std::size_t EntryNum) {
1152 MipsGOTParser::makeGOTIter(ArrayRef GOT, std::size_t EntryNum) {
11531153 const char *Data = reinterpret_cast(GOT.data());
11541154 return GOTIter(sizeof(GOTEntry), Data + EntryNum * sizeof(GOTEntry));
11551155 }
12351235 return;
12361236 }
12371237
1238 MipsGOTParser(Obj, W).ParseGOT(*GotShdr);
1239 }
1238 MipsGOTParser(Obj, W).parseGOT(*GotShdr);
1239 }