Use offsets instead of addresses in ELF_SECTION_IN_SEGMENT for non SHT_NOBITS
authorAlan Hayward <alan.hayward@arm.com>
Thu, 21 Jun 2018 08:37:58 +0000 (09:37 +0100)
committerAlan Hayward <alan.hayward@arm.com>
Thu, 21 Jun 2018 08:37:58 +0000 (09:37 +0100)
commit57c0d77c2ce5e583dab322e05f8291bcbad0ccd3
tree285687451f3e8b296f404aa8990b95df36472835
parent0d0b0ea29af6abc0790d22f843a3d0cb09424a3a
Use offsets instead of addresses in ELF_SECTION_IN_SEGMENT for non SHT_NOBITS

For sections that are not SHT_NOBITS, use sh_offset and p_offset instead of
sh_addr and p_vaddr when calculating if a section fits in a segment. Both
methods are valid when using the GNU linker.

include/
* elf/internal.h (ELF_SECTION_IN_SEGMENT): Don’t check addresses
for non SHT_NOBITS.
include/ChangeLog
include/elf/internal.h