diff options
| author | Rui Ueyama <ruiu@google.com> | 2015-08-14 05:17:30 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2015-08-14 05:17:30 +0000 |
| commit | 8050d32b130457e8d27f3b66f3b6a9872c922369 (patch) | |
| tree | c18553b4f4c77ba86f1db749e3d840d0f7e45c91 | |
| parent | b611e3f50e6c9fb564864e437ad8fd26809f0a19 (diff) | |
| download | bcm5719-llvm-8050d32b130457e8d27f3b66f3b6a9872c922369.tar.gz bcm5719-llvm-8050d32b130457e8d27f3b66f3b6a9872c922369.zip | |
ELF2: Rename a function to make it the same as the COFF's counterpart.
llvm-svn: 245030
| -rw-r--r-- | lld/ELF/Writer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lld/ELF/Writer.cpp b/lld/ELF/Writer.cpp index 45afd283377..7075f4d3a48 100644 --- a/lld/ELF/Writer.cpp +++ b/lld/ELF/Writer.cpp @@ -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>::writeHeader() { // 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>::openFile(StringRef Path) { 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()); } |

