[Git][ghc/ghc][wip/haskell-nix-patches/musl64/ghc-9.6-missing-symbols-deadbeef] wrk: add test, still failing though

doyougnu (@doyougnu) gitlab at gitlab.haskell.org
Wed Sep 11 19:10:33 UTC 2024



doyougnu pushed to branch wip/haskell-nix-patches/musl64/ghc-9.6-missing-symbols-deadbeef at Glasgow Haskell Compiler / GHC


Commits:
04077f81 by doyougnu at 2024-09-11T15:10:01-04:00
wrk: add test, still failing though

- - - - -


7 changed files:

- rts/Linker.c
- rts/linker/elf_got.c
- − testsuite/tests/rts/T25240/all.T
- testsuite/tests/rts/T25240/FFI.hs → testsuite/tests/rts/flags/T25240/FFI.hs
- + testsuite/tests/rts/flags/T25240/T25240.hs
- testsuite/tests/rts/T25240/TH.hs → testsuite/tests/rts/flags/T25240/TH.hs
- + testsuite/tests/rts/flags/T25240/all.T


Changes:

=====================================
rts/Linker.c
=====================================
@@ -951,7 +951,7 @@ SymbolAddr* lookupSymbol( SymbolName* lbl )
         IF_DEBUG(linker, printLoadedObjects());
         fflush(stderr);
 
-        // if -link-unknown-symbols is passed into the RTS we allow the linker
+        // if --link-unknown-symbols is passed into the RTS we allow the linker
         // to optimistically continue
         if (RtsFlags.MiscFlags.linkUnknownSymbols){
             r = (void*) 0xDEADBEEF;


=====================================
rts/linker/elf_got.c
=====================================
@@ -100,13 +100,13 @@ fillGot(ObjectCode * oc) {
                                 errorBelch("Failed to lookup symbol: %s\n",
                                            symbol->name);
 
-                                // if -link-unknown-symbols is passed into the
+                                // if --link-unknown-symbols is passed into the
                                 // RTS we allow the linker to optimistically
                                 // continue
                                 if (RtsFlags.MiscFlags.linkUnknownSymbols) {
                                     symbol->addr = (void*) 0xDEADBEEF;
                                 } else {
-                                return EXIT_FAILURE;
+                                    return EXIT_FAILURE;
                                 }
 
                             }


=====================================
testsuite/tests/rts/T25240/all.T deleted
=====================================
@@ -1,2 +0,0 @@
-test('T25240',
-    [req_rts_linker, extra_files(['FFI.hs', 'TH.hs'])], compile, ['-flink-unknown-symbols'])


=====================================
testsuite/tests/rts/T25240/FFI.hs → testsuite/tests/rts/flags/T25240/FFI.hs
=====================================
@@ -3,7 +3,7 @@
 {-# LANGUAGE TemplateHaskell #-}
 {-# LANGUAGE UnliftedFFITypes #-}
 
-module T25240.FFI
+module FFI
   ( D(..), D2(..), tabulate
   ) where
 
@@ -11,7 +11,9 @@ import GHC.Exts ( Double#, Double(D#) )
 import Language.Haskell.TH ( CodeQ )
 
 data D = D Double
+  deriving Show
 data D2 = D2 { x, y :: D }
+  deriving Show
 
 tabulate :: ( Word -> CodeQ D ) -> CodeQ ( D2 )
 tabulate f = [|| D2 $$( f 1 ) $$( f 2 ) ||]


=====================================
testsuite/tests/rts/flags/T25240/T25240.hs
=====================================
@@ -0,0 +1,5 @@
+
+import TH
+
+main :: IO ()
+main = print th_bug


=====================================
testsuite/tests/rts/T25240/TH.hs → testsuite/tests/rts/flags/T25240/TH.hs
=====================================


=====================================
testsuite/tests/rts/flags/T25240/all.T
=====================================
@@ -0,0 +1,2 @@
+test('T25240', [req_rts_linker, extra_files(['FFI.hs', 'TH.hs'])],
+    multimod_compile, ['T25240', '+RTS --link-unknown-symbols -RTS'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/04077f810f82218c85a5cb31a130b28abc1bfde0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/04077f810f82218c85a5cb31a130b28abc1bfde0
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240911/02ecd3b5/attachment-0001.html>


More information about the ghc-commits mailing list