Skip to content

Commit 8e8abea

Browse files
author
git apple-llvm automerger
committed
Merge commit 'f5ad8dc6876a' from llvm.org/release/21.x into stable/21.x
2 parents 4485397 + f5ad8dc commit 8e8abea

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lld/ELF/Relocations.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2153,9 +2153,8 @@ static int getHexagonPacketOffset(const InputSection &isec,
21532153
for (unsigned i = 0;; i++) {
21542154
if (i == 3 || rel.offset < (i + 1) * 4)
21552155
return i * 4;
2156-
uint32_t instWord = 0;
2157-
memcpy(&instWord, data.data() + (rel.offset - (i + 1) * 4),
2158-
sizeof(instWord));
2156+
uint32_t instWord =
2157+
read32(isec.getCtx(), data.data() + (rel.offset - (i + 1) * 4));
21592158
if (((instWord & HEXAGON_MASK_END_PACKET) == HEXAGON_END_OF_PACKET) ||
21602159
((instWord & HEXAGON_MASK_END_PACKET) == HEXAGON_END_OF_DUPLEX))
21612160
return i * 4;

0 commit comments

Comments
 (0)