Revert "Use offsets instead of addresses in ELF_SECTION_IN_SEGMENT for non SHT_NOBITS"

This reverts commit 57c0d77c2c.
This commit is contained in:
Alan Modra 2018-06-21 23:19:41 +09:30
parent eca4b72146
commit 2393a7e3e6
2 changed files with 5 additions and 3 deletions

View 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.

View 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) \