aboutsummaryrefslogtreecommitdiff
path: root/binutils/readelf.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2006-02-10 15:04:19 +0000
committerH.J. Lu <hjl.tools@gmail.com>2006-02-10 15:04:19 +0000
commit84d1d6507cd684f6c517bd4d5056128b3fc7ef71 (patch)
treec68b98adc7bbb406424c061fe57dc00dc9428c8b /binutils/readelf.c
parent70e45ad9bb4476368d66997ec0df94abc9d3a2de (diff)
downloadgdb-84d1d6507cd684f6c517bd4d5056128b3fc7ef71.zip
gdb-84d1d6507cd684f6c517bd4d5056128b3fc7ef71.tar.gz
gdb-84d1d6507cd684f6c517bd4d5056128b3fc7ef71.tar.bz2
bfd/
2006-02-10 H.J. Lu <hongjiu.lu@intel.com> PR binutils/2258 * elf.c (copy_private_bfd_data): Renamed to ... (rewrite_elf_program_header): This. (copy_elf_program_header): New function. (copy_private_bfd_data): Likewise. binutils/ 2006-02-10 H.J. Lu <hongjiu.lu@intel.com> PR binutils/2258 * readelf.c (process_program_headers): Use ELF_IS_SECTION_IN_SEGMENT_MEMORY. include/elf/ 2006-02-10 H.J. Lu <hongjiu.lu@intel.com> PR binutils/2258 * internal.h (ELF_IS_SECTION_IN_SEGMENT_FILE): New. (ELF_IS_SECTION_IN_SEGMENT_MEMORY): Likewise.
Diffstat (limited to 'binutils/readelf.c')
-rw-r--r--binutils/readelf.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/binutils/readelf.c b/binutils/readelf.c
index a10dc41..208b6d4 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -3447,24 +3447,7 @@ 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
- ? (section->sh_addr >= segment->p_vaddr
- && section->sh_addr + section->sh_size
- <= 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)))
- /* .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))
+ if (ELF_IS_SECTION_IN_SEGMENT_MEMORY(section, segment))
printf ("%s ", SECTION_NAME (section));
}