diff options
author | Tamar Christina <tamar@zhox.com> | 2016-04-11 06:51:44 +0200 |
---|---|---|
committer | Tamar Christina <tamar@zhox.com> | 2016-04-11 07:31:39 +0200 |
commit | c6e579bc3820afe71e51b711ee579a4d658ffbf9 (patch) | |
tree | 9ec4a57102b36a8c06e935f3f83f5c23ad964cd2 /rts | |
parent | 2ef35d8fed58cb9f33190c6d9908262535b26f90 (diff) | |
download | haskell-c6e579bc3820afe71e51b711ee579a4d658ffbf9.tar.gz |
Add linker notes
Summary: Add linker notes following #11223 and D1805
Reviewers: austin, bgamari, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2102
GHC Trac Issues: #11223
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Linker.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/rts/Linker.c b/rts/Linker.c index a296afe1bb..782444a45c 100644 --- a/rts/Linker.c +++ b/rts/Linker.c @@ -208,6 +208,16 @@ typedef struct _RtsSymbolInfo { When a new declaration or statement is performed ultimately lookupSymbol is called without doing a re-link. + The goal of these different phases is to allow the linker to be able to perform + "lazy loading" of ObjectCode. The reason for this is that we want to only link + in symbols that are actually required for the link. This reduces: + + 1) Dependency chains, if A.o required a .o in libB but A.o isn't required to link + then we don't need to load libB. This means the dependency chain for libraries + such as mingw32 and mingwex can be broken down. + + 2) The number of duplicate symbols, since now only symbols that are + true duplicates will display the error. */ static /*Str*/HashTable *symhash; @@ -2711,6 +2721,9 @@ int ocTryLoad (ObjectCode* oc) { This call is intended to have no side-effects when a non-duplicate symbol is re-inserted. + + TODO: SymbolInfo can be moved into ObjectCode in order to be more + memory efficient. See Trac #11816 */ int x; SymbolInfo symbol; |