Skip to content

Instantly share code, notes, and snippets.

@bgamari
Created February 17, 2017 19:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bgamari/c846e6a5f2cd988716cd5e36c68d5bef to your computer and use it in GitHub Desktop.
Save bgamari/c846e6a5f2cd988716cd5e36c68d5bef to your computer and use it in GitHub Desktop.
diff --git a/rts/Linker.c b/rts/Linker.c
index 50f438afc2..33fdb2d723 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -4962,13 +4962,13 @@ static int getSectionKind_ELF( Elf_Shdr *hdr, int *is_bss )
/* .rodata-style section */
return SECTIONKIND_CODE_OR_RODATA;
}
-#ifndef openbsd_HOST_OS
+#ifdef SHT_INIT_ARRAY
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 */
+#endif
if (hdr->sh_type == SHT_NOBITS
&& (hdr->sh_flags & SHF_ALLOC) && (hdr->sh_flags & SHF_WRITE)) {
/* .bss-style section */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment