[PATCH] D130117: [LLD] [COFF] Improve the error message for too many exported symbols
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 20 06:59:36 PDT 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG801971e5b4c0: [LLD] [COFF] Improve the error message for too many exported symbols (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130117/new/
https://reviews.llvm.org/D130117
Files:
lld/COFF/DriverUtils.cpp
lld/test/COFF/export-limit.s
Index: lld/test/COFF/export-limit.s
===================================================================
--- lld/test/COFF/export-limit.s
+++ lld/test/COFF/export-limit.s
@@ -5,7 +5,7 @@
# RUN: lld-link -dll -noentry %t.obj -out:%t.dll -def:%t-65535.def
# RUN: env LLD_IN_TEST=1 not lld-link -dll -noentry %t.obj -out:%t.dll -def:%t-65536.def 2>&1 | FileCheck %s
-# CHECK: error: too many exported symbols
+# CHECK: error: too many exported symbols (got 65536, max 65535)
.text
.globl f
Index: lld/COFF/DriverUtils.cpp
===================================================================
--- lld/COFF/DriverUtils.cpp
+++ lld/COFF/DriverUtils.cpp
@@ -709,7 +709,7 @@
if (e.ordinal == 0)
e.ordinal = ++max;
if (max > std::numeric_limits<uint16_t>::max())
- fatal("too many exported symbols (max " +
+ fatal("too many exported symbols (got " + Twine(max) + ", max " +
Twine(std::numeric_limits<uint16_t>::max()) + ")");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130117.446146.patch
Type: text/x-patch
Size: 976 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220720/8b61710f/attachment.bin>
More information about the llvm-commits
mailing list