[GHC] #9481: Linker does not correctly resolve symbols in previously loaded objects

GHC ghc-devs at haskell.org
Wed Aug 20 13:03:49 UTC 2014


#9481: Linker does not correctly resolve symbols in previously loaded objects
-------------------------------------+-------------------------------------
              Reporter:  edsko       |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.8.2
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 I should be able to reproduce by downloading all the attachments and
 running `make` followed by `Linkerbug` right? In that case it seems to
 work for me (GHC 7.8.3, Linux x86_64):
 {{{
 rwbarton at morphism:/tmp/linkerbug$ make
 ghc -c -O a.c
 ghc -c -O b.c
 ghc -package ghc Linkerbug
 [1 of 1] Compiling Main             ( Linkerbug.hs, Linkerbug.o )
 Linking Linkerbug ...
 rwbarton at morphism:/tmp/linkerbug$ ./Linkerbug
 Loading object "b.o"
 Linkerbug: b.o: unknown symbol `defined_in_A'
   symbol resolution failed
 Loading object "a.o"
   symbol resolution ok
 Loading Haskell module "Main.hs"
   ok
 Running "Main.main"
 In B
 In A
 In B
   ok
 }}}

 I assume you are on OS X?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9481#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list