aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2004-09-22 07:24:14 +0000
committerAlan Modra <amodra@gmail.com>2004-09-22 07:24:14 +0000
commitcbaa0dc5745c8a049fb240105a7f3d5cc79fc78a (patch)
tree61fd34c2e66326b1bfe749637dee8fc0a0e3d9e6 /binutils
parent73adb214d0bb463b81ee4aea7e6f801a2835b8ca (diff)
downloadgdb-cbaa0dc5745c8a049fb240105a7f3d5cc79fc78a.zip
gdb-cbaa0dc5745c8a049fb240105a7f3d5cc79fc78a.tar.gz
gdb-cbaa0dc5745c8a049fb240105a7f3d5cc79fc78a.tar.bz2
binutils/
* readelf.c (process_program_headers): Don't include .tbss in non-TLS segments. ld/testsuite/ * ld-i386/tlsbin.rd: Update for changed segment map. * ld-i386/tlsnopic.rd: Likewise. * ld-i386/tlspic.rd: Likewise. * ld-powerpc/tlsexe.r: Likewise. * ld-powerpc/tlsexe32.r: Likewise. * ld-powerpc/tlsexetoc.r: Likewise. * ld-powerpc/tlsso.r: Likewise. * ld-powerpc/tlsso32.r: Likewise. * ld-powerpc/tlstocso.r: Likewise. * ld-s390/tlsbin.rd: Likewise. * ld-s390/tlsbin_64.rd: Likewise. * ld-s390/tlspic.rd: Likewise. * ld-s390/tlspic_64.rd: Likewise. * ld-sh/tlsbin-2.d: Likewise. * ld-sh/tlspic-2.d: Likewise. * ld-x86-64/tlsbin.rd: Likewise. * ld-x86-64/tlspic.rd: Likewise.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog5
-rw-r--r--binutils/readelf.c7
2 files changed, 11 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 71708aa..4b07924 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-22 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (process_program_headers): Don't include .tbss in non-TLS
+ segments.
+
2004-09-17 Alan Modra <amodra@bigpond.net.au>
* Makefile.am: Run "make dep-am".
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));
}