aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 6b03b23..d0569c4 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3302,7 +3302,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));
}