[GHC] #15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for external symbol

#15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for external symbol -------------------------------------+------------------------------------- Reporter: watashi | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 (CodeGen) | Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: None/Unknown (amd64) | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- When compiling code with `-prof -fPIC -fexternal-dynamic-refs`, the generated object file may contains R_X86_64_PC32 relocation to symbols defined in another object file. will add more details -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15723 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for external symbol -------------------------------------+------------------------------------- Reporter: watashi | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 (CodeGen) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by watashi): * cc: simonmar (added) Old description:
When compiling code with `-prof -fPIC -fexternal-dynamic-refs`, the generated object file may contains R_X86_64_PC32 relocation to symbols defined in another object file.
will add more details
New description:
When compiling code with `-prof -fPIC -fexternal-dynamic-refs`, the
generated object file may contains R_X86_64_PC32 relocation to symbols
defined in another object file.
{{{
$ cat T15723A.hs T15723B.hs
module T15723A where
{-# INLINE foo #-}
foo :: Int -> Int
foo x = {-# SCC foo1 #-} bar x
{-# NOINLINE bar #-}
bar :: Int -> Int
bar x = x
module T15723B where
import T15723A
test :: Int -> Int
test x = {-# SCC test1 #-} foo $ foo x
$ $HC -prof -prof -fPIC -fexternal-dynamic-refs -O2 -c T15723A.hs
$ $HC -prof -prof -fPIC -fexternal-dynamic-refs -O2 -c T15723B.hs
$ objdump -rdS T15723B.o | less
0000000000000028

#15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for external symbol -------------------------------------+------------------------------------- Reporter: watashi | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 (CodeGen) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5214 Wiki Page: | -------------------------------------+------------------------------------- Changes (by watashi): * differential: => Phab:D5214 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15723#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for external symbol -------------------------------------+------------------------------------- Reporter: watashi | Owner: watashi Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 (CodeGen) | Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5214 Wiki Page: | -------------------------------------+------------------------------------- Changes (by watashi): * owner: (none) => watashi -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15723#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for
external symbol
-------------------------------------+-------------------------------------
Reporter: watashi | Owner: watashi
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.6.1
(CodeGen) |
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5214
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari

#15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for external symbol -------------------------------------+------------------------------------- Reporter: watashi | Owner: watashi Type: bug | Status: closed Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.6.1 (CodeGen) | Resolution: fixed | Keywords: Operating System: Linux | Architecture: x86_64 | (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D5214 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15723#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15723: -prof -fPIC -fexternal-dynamic-refs generates non-PIC relocations for
external symbol
-------------------------------------+-------------------------------------
Reporter: watashi | Owner: watashi
Type: bug | Status: closed
Priority: normal | Milestone: 8.8.1
Component: Compiler | Version: 8.6.1
(CodeGen) |
Resolution: fixed | Keywords:
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D5214
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari
participants (1)
-
GHC