summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/MC/MCAssembler.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index f0e1d7fbc2..8db1536d2d 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -447,7 +447,7 @@ uint64_t MCAssembler::ComputeFragmentSize(MCAsmLayout &Layout,
// FIXME: We need a way to communicate this error.
int64_t Offset = TargetLocation - FragmentOffset;
- if (Offset < 0)
+ if (Offset < 0 || Offset >= 0x40000000)
report_fatal_error("invalid .org offset '" + Twine(TargetLocation) +
"' (at offset '" + Twine(FragmentOffset) + "'");