Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106065388
D34652.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D34652.diff
View Options
diff --git a/contrib/llvm-project/lld/ELF/Relocations.cpp b/contrib/llvm-project/lld/ELF/Relocations.cpp
--- a/contrib/llvm-project/lld/ELF/Relocations.cpp
+++ b/contrib/llvm-project/lld/ELF/Relocations.cpp
@@ -1966,7 +1966,8 @@
// out in the relocation addend. We compensate for the PC bias so that
// an Arm and Thumb relocation to the same destination get the same keyAddend,
// which is usually 0.
- int64_t keyAddend = rel.addend + getPCBias(rel.type);
+ const int64_t pcBias = getPCBias(rel.type);
+ const int64_t keyAddend = rel.addend + pcBias;
// We use a ((section, offset), addend) pair to find the thunk position if
// possible so that we create only one thunk for aliased symbols or ICFed
@@ -1985,7 +1986,7 @@
if (isThunkSectionCompatible(isec, t->getThunkTargetSym()->section) &&
t->isCompatibleWith(*isec, rel) &&
target->inBranchRange(rel.type, src,
- t->getThunkTargetSym()->getVA(rel.addend)))
+ t->getThunkTargetSym()->getVA(-pcBias)))
return std::make_pair(t, false);
// No existing compatible Thunk in range, create a new one
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 25, 7:35 PM (10 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15598237
Default Alt Text
D34652.diff (1 KB)
Attached To
Mode
D34652: Merge LLVM commit c03fdd340356 to fix lang/rust on powerpc
Attached
Detach File
Event Timeline
Log In to Comment