mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
MC: Give a (lame) hard error if a .org directive would create an unreasonably
large object file (> 1GB). llvm-svn: 113494
This commit is contained in:
parent
90172ab0b5
commit
8c7fe0e9d0
@ -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) + "'");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user