aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/MC/WinCOFFObjectWriter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-06-23 02:15:56 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-06-23 02:15:56 +0000
commit34e94a87830910fc35ffcc3eba50636b6256059c (patch)
tree6f651c8020203b716938c44215409a7cc5df5846 /llvm/lib/MC/WinCOFFObjectWriter.cpp
parentb2bbd9c9ef7be9025e804a418ef2f59b64ebb198 (diff)
downloadllvm-34e94a87830910fc35ffcc3eba50636b6256059c.zip
llvm-34e94a87830910fc35ffcc3eba50636b6256059c.tar.gz
llvm-34e94a87830910fc35ffcc3eba50636b6256059c.tar.bz2
COFF: handle "undef - ." expressions.
This is another thing that the ELF implementation can do but is missing from COFF. llvm-svn: 306078
Diffstat (limited to 'llvm/lib/MC/WinCOFFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index 08b349c..8d8c5ff 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/lib/MC/WinCOFFObjectWriter.cpp
@@ -746,17 +746,6 @@ void WinCOFFObjectWriter::recordRelocation(
return;
}
- if (!A.getFragment()) {
- Asm.getContext().reportError(
- Fixup.getLoc(),
- Twine("symbol '") + A.getName() +
- "' can not be undefined in a subtraction expression");
- return;
- }
-
- assert(&A.getSection() != &B->getSection() &&
- "This doesn't need a relocation");
-
// Offset of the symbol in the section
int64_t OffsetOfB = Layout.getSymbolOffset(*B);