Skip to content

Commit 9eb1f2d

Browse files
committed
[ELF] Remove a special case from ExprValue::getSectionOffset. NFC
The special cases added by https://reviews.llvm.org/D42911 (defsym-reserved-syms.s) are unneeded after https://reviews.llvm.org/D66717
1 parent 5b7dfa9 commit 9eb1f2d

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

lld/ELF/LinkerScript.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,6 @@ uint64_t ExprValue::getSecAddr() const {
122122
}
123123

124124
uint64_t ExprValue::getSectionOffset() const {
125-
// If the alignment is trivial, we don't have to compute the full
126-
// value to know the offset. This allows this function to succeed in
127-
// cases where the output section is not yet known.
128-
if (alignment == 1 && !sec)
129-
return val;
130125
return getValue() - getSecAddr();
131126
}
132127

0 commit comments

Comments
 (0)