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:
ad39b5b
)
[ELF] Simplify InputSection::writeTo. NFC
author
Fangrui Song
<i@maskray.me>
Thu, 27 Jan 2022 06:03:26 +0000
(22:03 -0800)
committer
Fangrui Song
<i@maskray.me>
Thu, 27 Jan 2022 06:03:26 +0000
(22:03 -0800)
lld/ELF/InputSection.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/InputSection.cpp
b/lld/ELF/InputSection.cpp
index
e6ce2c3
..
943cf18
100644
(file)
--- a/
lld/ELF/InputSection.cpp
+++ b/
lld/ELF/InputSection.cpp
@@
-1261,9
+1261,8
@@
template <class ELFT> void InputSection::writeTo(uint8_t *buf) {
// Copy section contents from source object file to output file
// and then apply relocations.
- memcpy(buf, data().data(), data().size());
- uint8_t *bufEnd = buf + data().size();
- relocate<ELFT>(buf, bufEnd);
+ memcpy(buf, rawData.data(), rawData.size());
+ relocate<ELFT>(buf, buf + rawData.size());
}
void InputSection::replace(InputSection *other) {