diff options
author | Alan Modra <amodra@gmail.com> | 2008-10-08 08:30:27 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2008-10-08 08:30:27 +0000 |
commit | aea274d3a7cefa3f3a858ece7444ec49f9a108f0 (patch) | |
tree | 36eb0f9ab6b4c0b440fe16dd36d578c0e26121b1 /bfd/elf.c | |
parent | a90e4d49cb2d1d5543516838681658a3e0d8ffce (diff) | |
download | gdb-aea274d3a7cefa3f3a858ece7444ec49f9a108f0.zip gdb-aea274d3a7cefa3f3a858ece7444ec49f9a108f0.tar.gz gdb-aea274d3a7cefa3f3a858ece7444ec49f9a108f0.tar.bz2 |
* elf.c (assign_file_positions_for_load_sections): When checking
a segment for contents, don't assume that a non-TLS nobits section
must only be followed by nobits sections.
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 23 |
1 files changed, 8 insertions, 15 deletions
@@ -4288,21 +4288,14 @@ assign_file_positions_for_load_sections (bfd *abfd, elf_section_type (m->sections[i]) = SHT_NOBITS; /* Find out whether this segment contains any loadable - sections. If the first section isn't loadable, the same - holds for any other sections. */ - i = 0; - while (elf_section_type (m->sections[i]) == SHT_NOBITS) - { - /* If a segment starts with .tbss, we need to look - at the next section to decide whether the segment - has any loadable sections. */ - if ((elf_section_flags (m->sections[i]) & SHF_TLS) == 0 - || ++i >= m->count) - { - no_contents = TRUE; - break; - } - } + sections. */ + no_contents = TRUE; + for (i = 0; i < m->count; i++) + if (elf_section_type (m->sections[i]) != SHT_NOBITS) + { + no_contents = FALSE; + break; + } off_adjust = vma_page_aligned_bias (m->sections[0]->vma, off, align); off += off_adjust; |