mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-30 00:52:16 +08:00
* bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
PT_DYNAMIC segment, unless .dynamic.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2005-01-07 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
|
||||||
|
PT_DYNAMIC segment, unless .dynamic.
|
||||||
|
|
||||||
2005-01-06 Paul Brook <paul@codesourcery.com>
|
2005-01-06 Paul Brook <paul@codesourcery.com>
|
||||||
|
|
||||||
* config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
|
* config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
|
||||||
|
11
bfd/elf.c
11
bfd/elf.c
@ -4965,7 +4965,9 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
|
|||||||
4. The section has not already been allocated to a previous segment.
|
4. The section has not already been allocated to a previous segment.
|
||||||
5. PT_GNU_STACK segments do not include any sections.
|
5. PT_GNU_STACK segments do not include any sections.
|
||||||
6. PT_TLS segment includes only SHF_TLS sections.
|
6. PT_TLS segment includes only SHF_TLS sections.
|
||||||
7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments. */
|
7. SHF_TLS sections are only in PT_TLS or PT_LOAD segments.
|
||||||
|
8. PT_DYNAMIC should not contain empty sections at the beginning
|
||||||
|
(with the possible exception of .dynamic). */
|
||||||
#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \
|
#define INCLUDE_SECTION_IN_SEGMENT(section, segment, bed) \
|
||||||
((((segment->p_paddr \
|
((((segment->p_paddr \
|
||||||
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
|
? IS_CONTAINED_BY_LMA (section, segment, segment->p_paddr) \
|
||||||
@ -4979,6 +4981,13 @@ copy_private_bfd_data (bfd *ibfd, bfd *obfd)
|
|||||||
&& (segment->p_type == PT_LOAD \
|
&& (segment->p_type == PT_LOAD \
|
||||||
|| segment->p_type == PT_TLS \
|
|| segment->p_type == PT_TLS \
|
||||||
|| (section->flags & SEC_THREAD_LOCAL) == 0) \
|
|| (section->flags & SEC_THREAD_LOCAL) == 0) \
|
||||||
|
&& (segment->p_type != PT_DYNAMIC \
|
||||||
|
|| SECTION_SIZE (section, segment) > 0 \
|
||||||
|
|| (segment->p_paddr \
|
||||||
|
? segment->p_paddr != section->lma \
|
||||||
|
: segment->p_vaddr != section->vma) \
|
||||||
|
|| (strcmp (bfd_get_section_name (ibfd, section), ".dynamic") \
|
||||||
|
== 0)) \
|
||||||
&& ! section->segment_mark)
|
&& ! section->segment_mark)
|
||||||
|
|
||||||
/* Returns TRUE iff seg1 starts after the end of seg2. */
|
/* Returns TRUE iff seg1 starts after the end of seg2. */
|
||||||
|
Reference in New Issue
Block a user