Skip to content

Commit 213896b

Browse files
committed
[ELF] Remove unused InputSection::getOffsetInFile
1 parent e7774f4 commit 213896b

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

lld/ELF/InputSection.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,6 @@ void InputSectionBase::uncompress() const {
153153
uncompressedSize = -1;
154154
}
155155

156-
uint64_t InputSectionBase::getOffsetInFile() const {
157-
const uint8_t *fileStart = (const uint8_t *)file->mb.getBufferStart();
158-
const uint8_t *secStart = data().begin();
159-
return secStart - fileStart;
160-
}
161-
162156
template <class ELFT> RelsOrRelas<ELFT> InputSectionBase::relsOrRelas() const {
163157
if (relSecIdx == 0)
164158
return {};

lld/ELF/InputSection.h

-2
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,6 @@ class InputSectionBase : public SectionBase {
156156
return rawData;
157157
}
158158

159-
uint64_t getOffsetInFile() const;
160-
161159
// Input sections are part of an output section. Special sections
162160
// like .eh_frame and merge sections are first combined into a
163161
// synthetic section that is then added to an output section. In all

0 commit comments

Comments
 (0)