summaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2006-02-02 22:53:46 +0000
committerH.J. Lu <hjl@lucon.org>2006-02-02 22:53:46 +0000
commitae43c03480cf12560fb61fe9207520f5b470fe90 (patch)
tree61a556febf8bc3710b79fca0fff97bfe471739f6 /binutils
parentb868b54b9096a55c266deb5d5d97ba100dfe0570 (diff)
downloadbinutils-redhat-ae43c03480cf12560fb61fe9207520f5b470fe90.tar.gz
Updo the last change to binutils and ld/testsuite.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog4
-rw-r--r--binutils/readelf.c11
2 files changed, 10 insertions, 5 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index b7d4ee096c..0d027b0fbb 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,5 +1,9 @@
2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
+ * readelf.c (process_program_headers): Undo the last change.
+
+2006-02-02 H.J. Lu <hongjiu.lu@intel.com>
+
* readelf.c (process_program_headers): Undo the change made on
2004-09-22. Match PT_DYNAMIC segment only with SHT_DYNAMIC
sections.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 04f64adca0..f0385d0f9c 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3405,10 +3405,6 @@ process_program_headers (FILE *file)
for (j = 1; j < elf_header.e_shnum; j++, section++)
{
if (section->sh_size > 0
- /* PT_DYNAMIC segment contains only SHT_DYNAMIC
- sections. */
- && (segment->p_type != PT_DYNAMIC
- || section->sh_type == SHT_DYNAMIC)
/* Compare allocated sections by VMA, unallocated
sections by file offset. */
&& (section->sh_flags & SHF_ALLOC
@@ -3417,7 +3413,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));
}