diff --git a/include/ChangeLog b/include/ChangeLog index b8a0a2324d..f5fdf43166 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,8 @@ +2018-06-21 Alan Hayward + + * elf/internal.h (ELF_SECTION_IN_SEGMENT): Don’t check addresses + for non SHT_NOBITS. + 2018-06-19 Simon Marchi Sync with GCC diff --git a/include/elf/internal.h b/include/elf/internal.h index 05f9fab89c..b012820f6c 100644 --- a/include/elf/internal.h +++ b/include/elf/internal.h @@ -342,8 +342,10 @@ struct elf_segment_map && (((sec_hdr)->sh_offset - (segment)->p_offset \ + ELF_SECTION_SIZE(sec_hdr, segment)) \ <= (segment)->p_filesz))) \ - /* SHF_ALLOC sections must have VMAs within the segment. */ \ + /* SHT_NOBITS sections with SHF_ALLOC must have VMAs within the \ + segment. */ \ && (!(check_vma) \ + || (sec_hdr)->sh_type != SHT_NOBITS \ || ((sec_hdr)->sh_flags & SHF_ALLOC) == 0 \ || ((sec_hdr)->sh_addr >= (segment)->p_vaddr \ && (!(strict) \