MC/Mach-O/x86_64: Add a new hook for checking whether a particular section can

be diced into atoms, and adjust getAtom() to take this into account.
 - This fixes relocations to symbols in fixed size literal sections, for
   example.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103532 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Daniel Dunbar
2010-05-12 00:38:17 +00:00
parent 85f4fdaed4
commit a5f1d57f65
4 changed files with 173 additions and 77 deletions

View File

@@ -90,6 +90,14 @@ public:
return false;
}
/// isSectionAtomizable - Check whether the given section can be split into
/// atoms.
///
/// \see MCAssembler::isSymbolLinkerVisible().
virtual bool isSectionAtomizable(const MCSection &Section) const {
return true;
}
/// isVirtualSection - Check whether the given section is "virtual", that is
/// has no actual object file contents.
virtual bool isVirtualSection(const MCSection &Section) const = 0;