mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
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
This commit is contained in:
parent
874f021bc1
commit
a6c329d66b
@ -447,7 +447,7 @@ uint64_t MCAssembler::ComputeFragmentSize(MCAsmLayout &Layout,
|
|||||||
|
|
||||||
// FIXME: We need a way to communicate this error.
|
// FIXME: We need a way to communicate this error.
|
||||||
int64_t Offset = TargetLocation - FragmentOffset;
|
int64_t Offset = TargetLocation - FragmentOffset;
|
||||||
if (Offset < 0)
|
if (Offset < 0 || Offset >= 0x40000000)
|
||||||
report_fatal_error("invalid .org offset '" + Twine(TargetLocation) +
|
report_fatal_error("invalid .org offset '" + Twine(TargetLocation) +
|
||||||
"' (at offset '" + Twine(FragmentOffset) + "'");
|
"' (at offset '" + Twine(FragmentOffset) + "'");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user