PR binutils/4348
* objcopy.c (copy_object): Don't stop when there are no
sections to be copied.
testsuite/
2007-04-12 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/4348
* binutils-all/empty.s: New file.
* binutils-all/strip-3.d: Likewise.
* binutils-all/objcopy.exp: Run strip-3 for ELF target.
+2007-04-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/4348
+ * objcopy.c (copy_object): Don't stop when there are no
+ sections to be copied.
+
2007-04-10 Vladimir Prus <vladimir@codesourcery.com>
* NEWS: Mention disjoint histograms support in
}
}
- if (bfd_count_sections (obfd) == 0)
- {
- non_fatal (_("there are no sections to be copied!"));
- return FALSE;
- }
-
- if (gap_fill_set || pad_to_set)
+ if (bfd_count_sections (obfd) != 0
+ && (gap_fill_set || pad_to_set))
{
asection **set;
unsigned int c, i;
+2007-04-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/4348
+ * binutils-all/empty.s: New file.
+ * binutils-all/strip-3.d: Likewise.
+
+ * binutils-all/objcopy.exp: Run strip-3 for ELF target.
+
2007-02-27 Nathan Sidwell <nathan@codesourcery.com>
* binutils-all/objcopy.exp: Skip for uclinux targets.
--- /dev/null
+# An empty file.
run_dump_test "localize-hidden-1"
run_dump_test "strip-1"
run_dump_test "strip-2"
+ run_dump_test "strip-3"
}
run_dump_test "localize-hidden-2"
--- /dev/null
+#PROG: strip
+#source: empty.s
+#strip: -R .text -R .data -R .bss
+#readelf: -S --wide
+#name: strip empty file
+#target: *-*-linux*
+
+#...
+ \[[ 0]+\][ \t]+NULL[ \t]+.*
+ \[[ 1]+\] \.shstrtab.*[ \t]+STRTAB[ \t]+.*
+#pass