Commit bbf60786 authored by kgardas's avatar kgardas

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
parent daa5097f
......@@ -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 */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment