[Git][ghc/ghc][master] nativeGen: section flags for .text$foo only

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Oct 11 20:03:59 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
e99cf237 by Moritz Angermann at 2023-10-11T16:03:24-04:00
nativeGen: section flags for .text$foo only

Commit 3ece9856d157c85511d59f9f862ab351bbd9b38b, was supposed to fix
#22834 in !9810.

It does however add "xr" indiscriminatly to .text sections
even if splitSections is disabled. This leads to the assembler saying:

ghc_1.s:7849:0: error:
     Warning: Ignoring changed section attributes for .text
     |
7849 | .section .text,"xr"
     | ^

- - - - -


1 changed file:

- compiler/GHC/CmmToAsm/Ppr.hs


Changes:

=====================================
compiler/GHC/CmmToAsm/Ppr.hs
=====================================
@@ -246,9 +246,10 @@ pprGNUSectionHeader config t suffix =
         panic "PprBase.pprGNUSectionHeader: unknown section type"
     flags = case t of
       Text
-        | OSMinGW32 <- platformOS platform
+        | OSMinGW32 <- platformOS platform, splitSections
                     -> text ",\"xr\""
-        | otherwise -> text ",\"ax\"," <> sectionType platform "progbits"
+        | splitSections
+                    -> text ",\"ax\"," <> sectionType platform "progbits"
       CString
         | OSMinGW32 <- platformOS platform
                     -> empty



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/e99cf237f84db34be0468a893b10394d6b364bce
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/20231011/efe1250c/attachment.html>


More information about the ghc-commits mailing list