[llvm] 6521c40 - [MC] Remove an unneeded Darwin x86_64 workaround
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 19 16:16:30 PDT 2023
Author: Fangrui Song
Date: 2023-08-19T16:16:24-07:00
New Revision: 6521c40fb1e195b2653ac83020cf274e284b257a
URL: https://github.com/llvm/llvm-project/commit/6521c40fb1e195b2653ac83020cf274e284b257a
DIFF: https://github.com/llvm/llvm-project/commit/6521c40fb1e195b2653ac83020cf274e284b257a.diff
LOG: [MC] Remove an unneeded Darwin x86_64 workaround
The workaround (relocation suppression) from
7b46bb8e327d45598eb794e14fc87e8c2a55f65e (2011) has been unneeded after
bfd0f01dd75f299bb521a2a31f270b3687be2cee (2014) removed
`if (!A_base) return false;` and `if (!B_base) return false;`
Added:
Modified:
llvm/lib/MC/MachObjectWriter.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MachObjectWriter.cpp b/llvm/lib/MC/MachObjectWriter.cpp
index 6b263df92cbebb..04097dfe2e9f77 100644
--- a/llvm/lib/MC/MachObjectWriter.cpp
+++ b/llvm/lib/MC/MachObjectWriter.cpp
@@ -710,16 +710,6 @@ bool MachObjectWriter::isSymbolRefDifferenceFullyResolvedImpl(
return false;
return true;
}
- // For Darwin x86_64, there is one special case when the reference IsPCRel.
- // If the fragment with the reference does not have a base symbol but meets
- // the simple way of dealing with this, in that it is a temporary symbol in
- // the same atom then it is assumed to be fully resolved. This is needed so
- // a relocation entry is not created and so the static linker does not
- // mess up the reference later.
- else if(!FB.getAtom() &&
- SA.isTemporary() && SA.isInSection() && &SecA == &SecB){
- return true;
- }
}
// If they are not in the same section, we can't compute the
diff .
More information about the llvm-commits
mailing list