aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-02-02 22:53:46 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-02-02 22:53:46 +0000
commitd72d9b9e578cd3528c19a179021c9f4f4b4aa968 (patch)
treed59dc214f69efc9d62faf82aaea0392be8e48ae2 /binutils/readelf.c
parentec21a0f54c4de368bb435b19833e0315d35af1be (diff)
downloadgdb-d72d9b9e578cd3528c19a179021c9f4f4b4aa968.zip
gdb-d72d9b9e578cd3528c19a179021c9f4f4b4aa968.tar.gz
gdb-d72d9b9e578cd3528c19a179021c9f4f4b4aa968.tar.bz2
Updo the last change to binutils and ld/testsuite.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 04f64ad..f0385d0 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3405,10 +3405,6 @@ process_program_headers (FILE *file)
for (j = 1; j < elf_header.e_shnum; j++, section++)
{
if (section->sh_size > 0
- /* PT_DYNAMIC segment contains only SHT_DYNAMIC
- sections. */
- && (segment->p_type != PT_DYNAMIC
- || section->sh_type == SHT_DYNAMIC)
/* Compare allocated sections by VMA, unallocated
sections by file offset. */
&& (section->sh_flags & SHF_ALLOC
@@ -3417,7 +3413,12 @@ process_program_headers (FILE *file)
<= segment->p_vaddr + segment->p_memsz)
: ((bfd_vma) section->sh_offset >= segment->p_offset
&& (section->sh_offset + section->sh_size
- <= segment->p_offset + segment->p_filesz))))
+ <= segment->p_offset + segment->p_filesz)))
+ /* .tbss is special. It doesn't contribute memory space
+ to normal segments. */
+ && (!((section->sh_flags & SHF_TLS) != 0
+ && section->sh_type == SHT_NOBITS)
+ || segment->p_type == PT_TLS))
printf ("%s ", SECTION_NAME (section));
}