summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorReid Barton <rwbarton@gmail.com>2016-01-31 19:10:29 -0500
committerReid Barton <rwbarton@gmail.com>2016-01-31 19:10:29 -0500
commit34519f0811c58cb1fd073fae3f83b6543c69a634 (patch)
tree60fbefb83a55f398dcd569c763577c9183189ca6 /rts
parent669cbef03c220de43b0f88f2b2238bf3c02ed64c (diff)
downloadhaskell-34519f0811c58cb1fd073fae3f83b6543c69a634.tar.gz
When encountering a duplicate symbol, show source of the first symbol
Test Plan: Used this to track down an issue I was having. Reviewers: simonmar, austin, erikd, bgamari Reviewed By: erikd, bgamari Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D1863
Diffstat (limited to 'rts')
-rw-r--r--rts/Linker.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index b9a1d34a85..29bd5d8b47 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -430,13 +430,17 @@ static int ghciInsertSymbolTable(
" %s\n"
"whilst processing object file\n"
" %" PATH_FMT "\n"
+ "The symbol was previously defined in\n"
+ " %" PATH_FMT "\n"
"This could be caused by:\n"
" * Loading two different object files which export the same symbol\n"
" * Specifying the same object file twice on the GHCi command line\n"
" * An incorrect `package.conf' entry, causing some object to be\n"
" loaded twice.\n",
(char*)key,
- obj_name
+ obj_name,
+ pinfo->owner->archiveMemberName ? pinfo->owner->archiveMemberName
+ : pinfo->owner->fileName
);
return 0;
}