Show a proper error message if output file is too large.
authorRui Ueyama <ruiu@google.com>
Mon, 3 Dec 2018 17:42:57 +0000 (17:42 +0000)
committerRui Ueyama <ruiu@google.com>
Mon, 3 Dec 2018 17:42:57 +0000 (17:42 +0000)
commit3b6cd2c602010fb53f316201188e7daef63aab36
treee4ed20e98a5522f14ca40b5bf53e219dbe218aed
parent15eacd741faa5ec75ef55d82db3486cbaf91f46f
Show a proper error message if output file is too large.

At least on Linux, if a file size given to FileOutputBuffer is greater
than 2^63, it fails with "Invalid argument" error, which is not a
user-friendly error message. With this patch, lld prints out "output
file too large" instead.

llvm-svn: 348153
lld/ELF/Writer.cpp
lld/test/ELF/linkerscript/output-too-large.s