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:
385573e
)
[ELF] Use endianness-aware read32 to avoid dispatch. NFC
author
Fangrui Song
<i@maskray.me>
Wed, 16 Mar 2022 06:51:11 +0000
(23:51 -0700)
committer
Fangrui Song
<i@maskray.me>
Wed, 16 Mar 2022 06:51:11 +0000
(23:51 -0700)
lld/ELF/SyntheticSections.cpp
patch
|
blob
|
history
diff --git
a/lld/ELF/SyntheticSections.cpp
b/lld/ELF/SyntheticSections.cpp
index aa6ed9265ec6b8eae0a45098aba88debba23299a..dc2cd83b10dfb575e36a2e5e2292c9f357130a30 100644
(file)
--- a/
lld/ELF/SyntheticSections.cpp
+++ b/
lld/ELF/SyntheticSections.cpp
@@
-409,7
+409,8
@@
void EhFrameSection::addRecords(EhInputSection *sec, ArrayRef<RelTy> rels) {
return;
size_t offset = piece.inputOff;
- uint32_t id = read32(piece.data().data() + 4);
+ const uint32_t id =
+ endian::read32<ELFT::TargetEndianness>(piece.data().data() + 4);
if (id == 0) {
offsetToCie[offset] = addCie<ELFT>(piece, rels);
continue;