summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorKarel Gardas <karel.gardas@centrum.cz>2015-07-01 00:02:52 +0200
committerKarel Gardas <karel.gardas@centrum.cz>2015-07-01 00:08:27 +0200
commitbbf607865323f7d8dbd37dbfa2ae705fafb22417 (patch)
treeaea342ae683dae6acff1b1477fbf51e73a48d7b6 /rts
parentdaa5097facb228307d52e5d3e789e5c81494a475 (diff)
downloadhaskell-bbf607865323f7d8dbd37dbfa2ae705fafb22417.tar.gz
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
Diffstat (limited to 'rts')
-rw-r--r--rts/Linker.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index 2437e8366b..1b91e2f3d7 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 */