[lld] r245030 - ELF2: Rename a function to make it the same as the COFF's counterpart.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 13 22:17:30 PDT 2015
Author: ruiu
Date: Fri Aug 14 00:17:30 2015
New Revision: 245030
URL: http://llvm.org/viewvc/llvm-project?rev=245030&view=rev
Log:
ELF2: Rename a function to make it the same as the COFF's counterpart.
Modified:
lld/trunk/ELF/Writer.cpp
Modified: lld/trunk/ELF/Writer.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Writer.cpp?rev=245030&r1=245029&r2=245030&view=diff
==============================================================================
--- lld/trunk/ELF/Writer.cpp (original)
+++ lld/trunk/ELF/Writer.cpp Fri Aug 14 00:17:30 2015
@@ -54,7 +54,7 @@ public:
// Returns the size of the section in the output file.
uintX_t getSize() { return Header.sh_size; }
uintX_t getFlags() { return Header.sh_flags; }
- uintX_t getOffset() { return Header.sh_offset; }
+ uintX_t getFileOff() { return Header.sh_offset; }
uintX_t getAlign() { return Header.sh_addralign; }
virtual void finalize() {}
@@ -91,7 +91,7 @@ public:
}
void add(StringRef S) { StrTabBuilder.add(S); }
- size_t getOffset(StringRef S) { return StrTabBuilder.getOffset(S); }
+ size_t getFileOff(StringRef S) { return StrTabBuilder.getOffset(S); }
void writeTo(uint8_t *Buf) override;
void finalize() override {
@@ -359,7 +359,7 @@ template <class ELFT> void Writer<ELFT>:
// First entry is null.
++SHdrs;
for (OutputSectionBase<ELFT::Is64Bits> *Sec : OutputSections) {
- Sec->setNameOffset(StringTable.getOffset(Sec->getName()));
+ Sec->setNameOffset(StringTable.getFileOff(Sec->getName()));
Sec->template writeHeaderTo<ELFT::TargetEndianness>(SHdrs++);
}
}
@@ -375,5 +375,5 @@ template <class ELFT> void Writer<ELFT>:
template <class ELFT> void Writer<ELFT>::writeSections() {
uint8_t *Buf = Buffer->getBufferStart();
for (OutputSectionBase<ELFT::Is64Bits> *Sec : OutputSections)
- Sec->writeTo(Buf + Sec->getOffset());
+ Sec->writeTo(Buf + Sec->getFileOff());
}
More information about the llvm-commits
mailing list