[commit: ghc] master: disable check for .init_array section on OpenBSD (bbf6078)

git at git.haskell.org git at git.haskell.org
Thu Jul 2 06:07:58 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/bbf607865323f7d8dbd37dbfa2ae705fafb22417/ghc

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

commit bbf607865323f7d8dbd37dbfa2ae705fafb22417
Author: Karel Gardas <karel.gardas at centrum.cz>
Date:   Wed Jul 1 00:02:52 2015 +0200

    disable check for .init_array section on OpenBSD
    
    Summary:
    The patch disables check for .init_array section on OpenBSD.
    It is provided in OpenBSD ports tree and was done by Matthias Kilian.
    
    Reviewers: austin
    
    Subscribers: thomie, bgamari
    
    Differential Revision: https://phabricator.haskell.org/D1023


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

bbf607865323f7d8dbd37dbfa2ae705fafb22417
 rts/Linker.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rts/Linker.c b/rts/Linker.c
index 2437e83..1b91e2f 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -5304,13 +5304,13 @@ static int getSectionKind_ELF( Elf_Shdr *hdr, int *is_bss )
         /* .rodata-style section */
         return SECTIONKIND_CODE_OR_RODATA;
     }
-
+#ifndef openbsd_HOST_OS
     if (hdr->sh_type == SHT_INIT_ARRAY
         && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) {
        /* .init_array section */
         return SECTIONKIND_INIT_ARRAY;
     }
-
+#endif /* not OpenBSD */
     if (hdr->sh_type == SHT_NOBITS
         && (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) {
         /* .bss-style section */



More information about the ghc-commits mailing list