Hannes Siebenhandl pushed to branch wip/fendor/hpc-bc-support at Glasgow Haskell Compiler / GHC Commits: 661b24c6 by fendor at 2026-03-20T14:38:34+01:00 Fix CStub printing - - - - - 1 changed file: - compiler/GHC/Driver/CodeOutput.hs Changes: ===================================== compiler/GHC/Driver/CodeOutput.hs ===================================== @@ -346,15 +346,15 @@ outputForeignStubs logger tmpfs dflags unit_state mod location stubs pprCStubInitFiniDecls :: Platform -> CStub -> SDoc pprCStubInitFiniDecls platform cstub = - vcat (zipWith (pprInitOrFiniDecl ".init_array") [0 :: Int ..] (getInitializers cstub)) - $$ vcat (zipWith (pprInitOrFiniDecl ".fini_array") [0 :: Int ..] (getFinalizers cstub)) + vcat (zipWith (pprInitOrFiniDecl "ini" ".init_array") [0 :: Int ..] (getInitializers cstub)) + $$ vcat (zipWith (pprInitOrFiniDecl "fini" ".fini_array") [0 :: Int ..] (getFinalizers cstub)) where - pprInitOrFiniDecl :: String -> Int -> CLabel -> SDoc - pprInitOrFiniDecl section_name n lbl = + pprInitOrFiniDecl :: String -> String -> Int -> CLabel -> SDoc + pprInitOrFiniDecl suf section_name n lbl = vcat [ hsep [text "extern void", pprCLabel platform lbl, text "(void);"] , hsep [ text "static void (*" - <> text "__ghc_init_fini_" + <> text "__ghc_" <> text suf <> text "_" <> int n <> text ")(void)" , text "__attribute__((used, section(" View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/661b24c658a9b86139b1758cb5bfc6b5... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/661b24c658a9b86139b1758cb5bfc6b5... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Hannes Siebenhandl (@fendor)