diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2006-02-08 16:47:14 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2006-02-08 16:47:14 +0000 |
commit | eb4d9372857d63c244daea0193a8dcf6f9ee54e9 (patch) | |
tree | c780bd3f0433ae3d8d540683bd8d3f15f2fc6e7f /binutils/readelf.c | |
parent | c9dd6fef1f0f5c7dc38e195ca425aa7d9089de0c (diff) | |
download | gdb-eb4d9372857d63c244daea0193a8dcf6f9ee54e9.zip gdb-eb4d9372857d63c244daea0193a8dcf6f9ee54e9.tar.gz gdb-eb4d9372857d63c244daea0193a8dcf6f9ee54e9.tar.bz2 |
2006-02-08 H.J. Lu <hongjiu.lu@intel.com>
* readelf.c (process_program_headers): Match PT_TLS segment
only with SHT_TLS sections.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r-- | binutils/readelf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c index 0bb2fdb..a10dc41 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 |