[ELF] Remove unused InputSection::getOffsetInFile
authorFangrui Song <i@maskray.me>
Sun, 26 Dec 2021 23:18:56 +0000 (15:18 -0800)
committerFangrui Song <i@maskray.me>
Sun, 26 Dec 2021 23:18:56 +0000 (15:18 -0800)
lld/ELF/InputSection.cpp
lld/ELF/InputSection.h

index 6d26e19..76a29b0 100644 (file)
@@ -153,12 +153,6 @@ void InputSectionBase::uncompress() const {
   uncompressedSize = -1;
 }
 
-uint64_t InputSectionBase::getOffsetInFile() const {
-  const uint8_t *fileStart = (const uint8_t *)file->mb.getBufferStart();
-  const uint8_t *secStart = data().begin();
-  return secStart - fileStart;
-}
-
 template <class ELFT> RelsOrRelas<ELFT> InputSectionBase::relsOrRelas() const {
   if (relSecIdx == 0)
     return {};
index 5319830..cbb060f 100644 (file)
@@ -156,8 +156,6 @@ public:
     return rawData;
   }
 
-  uint64_t getOffsetInFile() const;
-
   // Input sections are part of an output section. Special sections
   // like .eh_frame and merge sections are first combined into a
   // synthetic section that is then added to an output section. In all