Skip to content

Commit 5834439

Browse files
author
anoopkg6
committed
Fix endiannes issue with MachO_ptrauth_noolloc_sections.yaml
1 parent 362119d commit 5834439

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/ExecutionEngine/JITLink/MachOLinkGraphBuilder.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ class MachOLinkGraphBuilder {
169169
getObject().getRelocation(RelItr->getRawDataRefImpl());
170170
MachO::relocation_info RI;
171171
RI.r_address = ARI.r_word0;
172-
RI.r_symbolnum = ARI.r_word1 & 0xffffff;
173-
RI.r_pcrel = (ARI.r_word1 >> 24) & 1;
174-
RI.r_length = (ARI.r_word1 >> 25) & 3;
175-
RI.r_extern = (ARI.r_word1 >> 27) & 1;
176-
RI.r_type = (ARI.r_word1 >> 28);
172+
RI.r_symbolnum = getObject().getPlainRelocationSymbolNum(ARI);
173+
RI.r_pcrel = getObject().getAnyRelocationPCRel(ARI);
174+
RI.r_length = getObject().getAnyRelocationLength(ARI);
175+
RI.r_extern = getObject().getPlainRelocationExternal(ARI);
176+
RI.r_type = getObject().getAnyRelocationType(ARI);
177177
return RI;
178178
}
179179

0 commit comments

Comments
 (0)