projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8fafaf
)
[ELF] Simplify InputSectionBase::getSize
author
Fangrui Song
<i@maskray.me>
Mon, 21 Nov 2022 00:02:36 +0000
(
00:02
+0000)
committer
Fangrui Song
<i@maskray.me>
Mon, 21 Nov 2022 00:02:36 +0000
(
00:02
+0000)
lld/ELF/InputSection.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/InputSection.cpp
b/lld/ELF/InputSection.cpp
index
f08db55
..
5238639
100644
(file)
--- a/
lld/ELF/InputSection.cpp
+++ b/
lld/ELF/InputSection.cpp
@@
-103,9
+103,7
@@
InputSectionBase::InputSectionBase(ObjFile<ELFT> &file,
size_t InputSectionBase::getSize() const {
if (auto *s = dyn_cast<SyntheticSection>(this))
return s->getSize();
- if (compressed)
- return size;
- return content().size() - bytesDropped;
+ return size - bytesDropped;
}
template <class ELFT>