From f4638467331c33e2f9dd00c12c175a9eb47351c8 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 20 Jul 2010 14:08:32 +0000 Subject: include/elf/ * internal.h (ELF_TBSS_SPECIAL): New macro, extracted from.. (ELF_SECTION_SIZE): ..here. (ELF_SECTION_IN_SEGMENT_1): Add "strict" arg. (ELF_SECTION_IN_SEGMENT_STRICT): New macro. bfd/ * elf.c (assign_file_positions_for_load_sections): Check that zero size sections are allocated in segments too. (assign_file_positions_for_non_load_sections): Warn if zero size alloc sections are found here. (copy_elf_program_header): Don't drop zero size sections from segment map. (copy_private_bfd_data): Check for changes in zero size sections. binutils/ * readelf.c (process_program_headers): Don't ignore all zero size sections. ld/testsuite/ * ld-powerpc/tlsexe.r: Update. * ld-powerpc/tlsexetoc.r: Update. * ld-powerpc/tlsso.r: Update. * ld-powerpc/tlstocso.r: Update. --- binutils/readelf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'binutils/readelf.c') diff --git a/binutils/readelf.c b/binutils/readelf.c index 883c482..447932c 100644 --- a/binutils/readelf.c +++ b/binutils/readelf.c @@ -3889,8 +3889,8 @@ process_program_headers (FILE * file) for (j = 1; j < elf_header.e_shnum; j++, section++) { - if (ELF_SECTION_SIZE (section, segment) != 0 - && ELF_SECTION_IN_SEGMENT (section, segment)) + if (!ELF_TBSS_SPECIAL (section, segment) + && ELF_SECTION_IN_SEGMENT_STRICT (section, segment)) printf ("%s ", SECTION_NAME (section)); } -- cgit v1.1