Revert "Use offsets instead of addresses in ELF_SECTION_IN_SEGMENT for non SHT_NOBITS"
authorAlan Modra <amodra@gmail.com>
Thu, 21 Jun 2018 13:49:41 +0000 (23:19 +0930)
committerAlan Modra <amodra@gmail.com>
Tue, 26 Jun 2018 11:58:05 +0000 (21:28 +0930)
This reverts commit 57c0d77c2ce5e583dab322e05f8291bcbad0ccd3.

include/ChangeLog
include/elf/internal.h

index 0ccf1c1063d245f85fc4a7877860ff8197cdb7c1..7fb0cb3de05d7d5f7ac7e52c86fe3d2a74907da6 100644 (file)
@@ -1,3 +1,7 @@
+2018-06-26  Alan Modra  <amodra@gmail.com>
+
+       * elf/internal.h (ELF_SECTION_IN_SEGMENT): Revert last change.
+
 2018-06-24  Nick Clifton  <nickc@redhat.com>
 
        2.31 branch created.
index b012820f6cf9c7e6b5879748b0b05685594987bb..05f9fab89cbe2aee94006d18a689cb01e101776f 100644 (file)
@@ -342,10 +342,8 @@ struct elf_segment_map
           && (((sec_hdr)->sh_offset - (segment)->p_offset              \
                + ELF_SECTION_SIZE(sec_hdr, segment))                   \
               <= (segment)->p_filesz)))                                \
-   /* SHT_NOBITS sections with SHF_ALLOC must have VMAs within the     \
-      segment.  */                                                     \
+   /* SHF_ALLOC sections 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)                                                \