From: H.J. Lu Date: Wed, 8 Feb 2006 16:47:14 +0000 (+0000) Subject: 2006-02-08 H.J. Lu X-Git-Tag: gdb_6_5-branchpoint~139 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb4d9372857d63c244daea0193a8dcf6f9ee54e9;p=thirdparty%2Fbinutils-gdb.git 2006-02-08 H.J. Lu * readelf.c (process_program_headers): Match PT_TLS segment only with SHT_TLS sections. --- diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 80dd58e4af7..fc78333e158 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2006-02-08 H.J. Lu + + * readelf.c (process_program_headers): Match PT_TLS segment + only with SHT_TLS sections. + 2006-02-07 Nathan Sidwell * readelf.c (get_machine_flags): Add logic for EF_M68K flags. diff --git a/binutils/readelf.c b/binutils/readelf.c index 0bb2fdb2c5b..a10dc41a888 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -3448,6 +3448,9 @@ process_program_headers (FILE *file) for (j = 1; j < elf_header.e_shnum; j++, section++) { if (section->sh_size > 0 + /* PT_TLS segment contains only SHF_TLS sections. */ + && (segment->p_type != PT_TLS + || (section->sh_flags & SHF_TLS) != 0) /* Compare allocated sections by VMA, unallocated sections by file offset. */ && (section->sh_flags & SHF_ALLOC