diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-09-09 16:23:33 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-09-09 16:23:33 +0000 |
commit | a6c329d66b5327a2ecaa27f3a64797f1a57711f3 (patch) | |
tree | 8b5b3cf0e8330f541d56477f4586ec1e79fc3048 | |
parent | 874f021bc16aaf4619fd818da150f1b63e408c80 (diff) |
MC: Give a (lame) hard error if a .org directive would create an unreasonably
large object file (> 1GB).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113494 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/MC/MCAssembler.cpp | 2 |
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) + "'"); |