[llvm] r258060 - [llvm-readobj][ELF] s/dyn_rela_/dyn_rel_/ No functional changes.
Simon Atanasyan via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 18 10:52:05 PST 2016
Author: atanasyan
Date: Mon Jan 18 12:52:04 2016
New Revision: 258060
URL: http://llvm.org/viewvc/llvm-project?rev=258060&view=rev
Log:
[llvm-readobj][ELF] s/dyn_rela_/dyn_rel_/ No functional changes.
Follow up to r258001. These template functions might return both REL and RELA
relocations. The 'rel' noun looks less ambiguous.
Modified:
llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
Modified: llvm/trunk/tools/llvm-readobj/ELFDumper.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-readobj/ELFDumper.cpp?rev=258060&r1=258059&r2=258060&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-readobj/ELFDumper.cpp (original)
+++ llvm/trunk/tools/llvm-readobj/ELFDumper.cpp Mon Jan 18 12:52:04 2016
@@ -110,10 +110,10 @@ private:
void printRelocation(Elf_Rela Rel, const Elf_Shdr *SymTab);
void printValue(uint64_t Type, uint64_t Value);
- template <typename RELA>
- static const RELA *dyn_rela_begin(const DynRegionInfo ®ion);
- template <typename RELA>
- static const RELA *dyn_rela_end(const DynRegionInfo ®ion);
+ template <typename REL>
+ static const REL *dyn_rel_begin(const DynRegionInfo ®ion);
+ template <typename REL>
+ static const REL *dyn_rel_end(const DynRegionInfo ®ion);
Elf_Rel_Range dyn_rels() const;
Elf_Rela_Range dyn_relas() const;
StringRef getDynamicString(uint64_t Offset) const;
@@ -1026,32 +1026,32 @@ ELFDumper<ELFT>::ELFDumper(const ELFFile
}
template <typename ELFT>
-template <typename RELA>
-const RELA *ELFDumper<ELFT>::dyn_rela_begin(const DynRegionInfo &Region) {
- if (Region.Size && Region.EntSize != sizeof(RELA))
+template <typename REL>
+const REL *ELFDumper<ELFT>::dyn_rel_begin(const DynRegionInfo &Region) {
+ if (Region.Size && Region.EntSize != sizeof(REL))
report_fatal_error("Invalid relocation entry size");
- return reinterpret_cast<const RELA *>(Region.Addr);
+ return reinterpret_cast<const REL *>(Region.Addr);
}
template <typename ELFT>
-template <typename RELA>
-const RELA *ELFDumper<ELFT>::dyn_rela_end(const DynRegionInfo &Region) {
+template <typename REL>
+const REL *ELFDumper<ELFT>::dyn_rel_end(const DynRegionInfo &Region) {
uint64_t Size = Region.Size;
- if (Size % sizeof(RELA))
+ if (Size % sizeof(REL))
report_fatal_error("Invalid relocation table size");
- return dyn_rela_begin<RELA>(Region) + Size / sizeof(RELA);
+ return dyn_rel_begin<REL>(Region) + Size / sizeof(REL);
}
template <typename ELFT>
typename ELFDumper<ELFT>::Elf_Rel_Range ELFDumper<ELFT>::dyn_rels() const {
- return make_range(dyn_rela_begin<Elf_Rel>(DynRelRegion),
- dyn_rela_end<Elf_Rel>(DynRelRegion));
+ return make_range(dyn_rel_begin<Elf_Rel>(DynRelRegion),
+ dyn_rel_end<Elf_Rel>(DynRelRegion));
}
template <typename ELFT>
typename ELFDumper<ELFT>::Elf_Rela_Range ELFDumper<ELFT>::dyn_relas() const {
- return make_range(dyn_rela_begin<Elf_Rela>(DynRelaRegion),
- dyn_rela_end<Elf_Rela>(DynRelaRegion));
+ return make_range(dyn_rel_begin<Elf_Rela>(DynRelaRegion),
+ dyn_rel_end<Elf_Rela>(DynRelaRegion));
}
template<class ELFT>
More information about the llvm-commits
mailing list