mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-24 20:29:53 +00:00
[llvm-readobj] Fix member functions name style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211152 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4f05d1dac8
commit
ef592db349
@ -1040,7 +1040,7 @@ public:
|
|||||||
|
|
||||||
MipsGOTParser(const ObjectFile *Obj, StreamWriter &W) : Obj(Obj), W(W) {}
|
MipsGOTParser(const ObjectFile *Obj, StreamWriter &W) : Obj(Obj), W(W) {}
|
||||||
|
|
||||||
void ParseGOT(const Elf_Shdr &GOTShdr);
|
void parseGOT(const Elf_Shdr &GOTShdr);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef typename ObjectFile::Elf_Sym_Iter Elf_Sym_Iter;
|
typedef typename ObjectFile::Elf_Sym_Iter Elf_Sym_Iter;
|
||||||
@ -1051,8 +1051,8 @@ private:
|
|||||||
const ObjectFile *Obj;
|
const ObjectFile *Obj;
|
||||||
StreamWriter &W;
|
StreamWriter &W;
|
||||||
|
|
||||||
std::size_t GetGOTTotal(ArrayRef<uint8_t> GOT) const;
|
std::size_t getGOTTotal(ArrayRef<uint8_t> GOT) const;
|
||||||
GOTIter MakeGOTIter(ArrayRef<uint8_t> GOT, std::size_t EntryNum);
|
GOTIter makeGOTIter(ArrayRef<uint8_t> GOT, std::size_t EntryNum);
|
||||||
|
|
||||||
bool getGOTTags(uint64_t &LocalGotNum, uint64_t &GotSym);
|
bool getGOTTags(uint64_t &LocalGotNum, uint64_t &GotSym);
|
||||||
void printGotEntry(uint64_t GotAddr, GOTIter BeginIt, GOTIter It);
|
void printGotEntry(uint64_t GotAddr, GOTIter BeginIt, GOTIter It);
|
||||||
@ -1062,7 +1062,7 @@ private:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
void MipsGOTParser<ELFT>::ParseGOT(const Elf_Shdr &GOTShdr) {
|
void MipsGOTParser<ELFT>::parseGOT(const Elf_Shdr &GOTShdr) {
|
||||||
// See "Global Offset Table" in Chapter 5 in the following document
|
// See "Global Offset Table" in Chapter 5 in the following document
|
||||||
// for detailed GOT description.
|
// for detailed GOT description.
|
||||||
// ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
|
// ftp://www.linux-mips.org/pub/linux/mips/doc/ABI/mipsabi.pdf
|
||||||
@ -1078,7 +1078,7 @@ void MipsGOTParser<ELFT>::ParseGOT(const Elf_Shdr &GOTShdr) {
|
|||||||
if (!getGOTTags(DtLocalGotNum, DtGotSym))
|
if (!getGOTTags(DtLocalGotNum, DtGotSym))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (DtLocalGotNum > GetGOTTotal(*GOT)) {
|
if (DtLocalGotNum > getGOTTotal(*GOT)) {
|
||||||
W.startLine() << "MIPS_LOCAL_GOTNO exceeds a number of GOT entries.\n";
|
W.startLine() << "MIPS_LOCAL_GOTNO exceeds a number of GOT entries.\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1094,13 +1094,13 @@ void MipsGOTParser<ELFT>::ParseGOT(const Elf_Shdr &GOTShdr) {
|
|||||||
|
|
||||||
std::size_t GlobalGotNum = DynSymTotal - DtGotSym;
|
std::size_t GlobalGotNum = DynSymTotal - DtGotSym;
|
||||||
|
|
||||||
if (DtLocalGotNum + GlobalGotNum > GetGOTTotal(*GOT)) {
|
if (DtLocalGotNum + GlobalGotNum > getGOTTotal(*GOT)) {
|
||||||
W.startLine() << "Number of global GOT entries exceeds the size of GOT.\n";
|
W.startLine() << "Number of global GOT entries exceeds the size of GOT.\n";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
GOTIter GotBegin = MakeGOTIter(*GOT, 0);
|
GOTIter GotBegin = makeGOTIter(*GOT, 0);
|
||||||
GOTIter GotLocalEnd = MakeGOTIter(*GOT, DtLocalGotNum);
|
GOTIter GotLocalEnd = makeGOTIter(*GOT, DtLocalGotNum);
|
||||||
GOTIter It = GotBegin;
|
GOTIter It = GotBegin;
|
||||||
|
|
||||||
DictScope GS(W, "Primary GOT");
|
DictScope GS(W, "Primary GOT");
|
||||||
@ -1131,7 +1131,7 @@ void MipsGOTParser<ELFT>::ParseGOT(const Elf_Shdr &GOTShdr) {
|
|||||||
{
|
{
|
||||||
ListScope GS(W, "Global entries");
|
ListScope GS(W, "Global entries");
|
||||||
|
|
||||||
GOTIter GotGlobalEnd = MakeGOTIter(*GOT, DtLocalGotNum + GlobalGotNum);
|
GOTIter GotGlobalEnd = makeGOTIter(*GOT, DtLocalGotNum + GlobalGotNum);
|
||||||
Elf_Sym_Iter GotDynSym = DynSymBegin + DtGotSym;
|
Elf_Sym_Iter GotDynSym = DynSymBegin + DtGotSym;
|
||||||
for (; It != GotGlobalEnd; ++It) {
|
for (; It != GotGlobalEnd; ++It) {
|
||||||
DictScope D(W, "Entry");
|
DictScope D(W, "Entry");
|
||||||
@ -1139,18 +1139,18 @@ void MipsGOTParser<ELFT>::ParseGOT(const Elf_Shdr &GOTShdr) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::size_t SpecGotNum = GetGOTTotal(*GOT) - DtLocalGotNum - GlobalGotNum;
|
std::size_t SpecGotNum = getGOTTotal(*GOT) - DtLocalGotNum - GlobalGotNum;
|
||||||
W.printNumber("Number of TLS and multi-GOT entries", uint64_t(SpecGotNum));
|
W.printNumber("Number of TLS and multi-GOT entries", uint64_t(SpecGotNum));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
std::size_t MipsGOTParser<ELFT>::GetGOTTotal(ArrayRef<uint8_t> GOT) const {
|
std::size_t MipsGOTParser<ELFT>::getGOTTotal(ArrayRef<uint8_t> GOT) const {
|
||||||
return GOT.size() / sizeof(GOTEntry);
|
return GOT.size() / sizeof(GOTEntry);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class ELFT>
|
template <class ELFT>
|
||||||
typename MipsGOTParser<ELFT>::GOTIter
|
typename MipsGOTParser<ELFT>::GOTIter
|
||||||
MipsGOTParser<ELFT>::MakeGOTIter(ArrayRef<uint8_t> GOT, std::size_t EntryNum) {
|
MipsGOTParser<ELFT>::makeGOTIter(ArrayRef<uint8_t> GOT, std::size_t EntryNum) {
|
||||||
const char *Data = reinterpret_cast<const char *>(GOT.data());
|
const char *Data = reinterpret_cast<const char *>(GOT.data());
|
||||||
return GOTIter(sizeof(GOTEntry), Data + EntryNum * sizeof(GOTEntry));
|
return GOTIter(sizeof(GOTEntry), Data + EntryNum * sizeof(GOTEntry));
|
||||||
}
|
}
|
||||||
@ -1236,5 +1236,5 @@ template <class ELFT> void ELFDumper<ELFT>::printMipsPLTGOT() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
MipsGOTParser<ELFT>(Obj, W).ParseGOT(*GotShdr);
|
MipsGOTParser<ELFT>(Obj, W).parseGOT(*GotShdr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user