From cbaa0dc5745c8a049fb240105a7f3d5cc79fc78a Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Wed, 22 Sep 2004 07:24:14 +0000 Subject: 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. --- binutils/ChangeLog | 5 +++++ binutils/readelf.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'binutils') 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 + + * readelf.c (process_program_headers): Don't include .tbss in non-TLS + segments. + 2004-09-17 Alan Modra * 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)); } -- cgit v1.1