From 9aa8ef7fbb5ada14b7c4585d6c1361aa5eab6f88 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Fri, 18 May 2007 08:59:43 +0000 Subject: src/ 2007-05-18 Roland McGrath * unstrip.c (copy_elided_sections): Match up non-NOBITS sections with stripped file, so as not to duplicate a section copied in both. * strip.c (handle_elf): Keep SHT_NOTE section copies in the debug file. tests/ 2007-05-18 Roland McGrath * run-strip-test4.sh (stripped, debugfile): Use new reference files. * testfile37.bz2: New data file. * testfile37.debug.bz2: New data file. * run-unstrip-test2.sh: New file. * Makefile.am (TESTS, EXTRA_DIST): Add them. --- src/elflint.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/elflint.c') diff --git a/src/elflint.c b/src/elflint.c index 09c7fbd2..db3b49c1 100644 --- a/src/elflint.c +++ b/src/elflint.c @@ -3407,7 +3407,9 @@ section [%2zu] '%s': merge flag set but entry size is zero\n"), || (phdr->p_type == PT_TLS && (shdr->sh_flags & SHF_TLS) != 0)) && phdr->p_offset <= shdr->sh_offset - && phdr->p_offset + phdr->p_memsz > shdr->sh_offset) + && (phdr->p_offset + phdr->p_filesz > shdr->sh_offset + || (phdr->p_offset + phdr->p_memsz > shdr->sh_offset + && shdr->sh_type == SHT_NOBITS))) { /* Found the segment. */ if (phdr->p_offset + phdr->p_memsz -- cgit v1.2.3