Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/f963d260c0125275eb32ae6f9b8422c8692b7fe4

>---------------------------------------------------------------

commit f963d260c0125275eb32ae6f9b8422c8692b7fe4
Author: Simon Marlow <[email protected]>
Date:   Mon Nov 21 13:27:15 2011 +0000

    Don't add the -x flag to ld when joining object files

>---------------------------------------------------------------

 compiler/main/DriverPipeline.hs |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 4b3968e..ddc238f 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2070,13 +2070,18 @@ joinObjectFiles dflags o_files output_fn = do
                                 else [])
                          ++ [
                             SysTools.Option ld_build_id,
-                            SysTools.Option ld_x_flag,
+                            -- SysTools.Option ld_x_flag,
                             SysTools.Option "-o",
                             SysTools.FileOption "" output_fn ]
                          ++ args)
 
-      ld_x_flag | null cLD_X = ""
-                | otherwise  = "-Wl,-x"
+      -- Do *not* add the -x flag to ld, because we want to keep those
+      -- local symbols around for the benefit of external tools. e.g.
+      -- the 'perf report' output is much less useful if all the local
+      -- symbols have been stripped out.
+      --
+      -- ld_x_flag | null cLD_X = ""
+      --           | otherwise  = "-Wl,-x"
 
       -- suppress the generation of the .note.gnu.build-id section,
       -- which we don't need and sometimes causes ld to emit a



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to