Package: binutils Version: 2.22-7 Severity: normal Tags: patch Hi,
Current debian's binutils have PR binutils/14319. This already fixed in upsteam. http://sourceware.org/bugzilla/show_bug.cgi?id=14319 I backported this and tested. The problem is corrected, work fine. Could you apply patch to debian? Best regards, Nobuhiro -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 3.2.0-2-amd64 (SMP w/2 CPU cores) Locale: LANG=ja_JP.UTF-8, LC_CTYPE=ja_JP.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages binutils depends on: ii libc6 2.13-34 ii libgcc1 1:4.7.1-3 ii libstdc++6 4.7.1-3 ii zlib1g 1:1.2.7.dfsg-13 binutils recommends no packages. Versions of packages binutils suggests: pn binutils-doc <none> -- no debconf information
diff -u binutils-2.22/debian/changelog binutils-2.22/debian/changelog --- binutils-2.22/debian/changelog +++ binutils-2.22/debian/changelog @@ -1,3 +1,10 @@ +binutils (2.22-7.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix PR binutils/14319. Add patches/pr14319.diff. + + -- Nobuhiro Iwamatsu <iwama...@debian.org> Sat, 14 Jul 2012 23:31:31 +0900 + binutils (2.22-7) unstable; urgency=low * Update from the binutils-2_22-branch 20120704. diff -u binutils-2.22/debian/patches/series binutils-2.22/debian/patches/series --- binutils-2.22/debian/patches/series +++ binutils-2.22/debian/patches/series @@ -35,0 +36 @@ +pr14319.diff only in patch2: unchanged: --- binutils-2.22.orig/debian/patches/pr14319.diff +++ binutils-2.22/debian/patches/pr14319.diff @@ -0,0 +1,60 @@ +# base code: http://sourceware.org/git/?p=binutils.git;a=commitdiff_plain;h=9fd0b9a622aaa64017f232611120ff7fa828b67a +# backport to 2.22. + +diff --git a/bfd/elf.c b/bfd/elf.c +index 9e23bee..a9cbe21 100644 +--- a/bfd/elf.c ++++ b/bfd/elf.c +@@ -1025,7 +1025,7 @@ _bfd_elf_make_section_from_shdr (bfd *abfd, + else + { + /* Normal section. Check if we should compress. */ +- if ((abfd->flags & BFD_COMPRESS)) ++ if ((abfd->flags & BFD_COMPRESS) && newsect->size != 0) + action = compress; + } + +diff --git a/binutils/testsuite/binutils-all/compress.exp b/binutils/testsuite/binutils-all/compress.exp +index 91ed7e4..8c40595 100644 +--- a/binutils/testsuite/binutils-all/compress.exp ++++ b/binutils/testsuite/binutils-all/compress.exp +@@ -133,3 +133,32 @@ if ![string match "" $got] then { + pass "$testname" + } + } ++ ++set testfile tmpdir/dw2-emty.o ++ ++if { ![binutils_assemble_flags $srcdir/$subdir/dw2-empty.S $testfile --nocompress-debug-sections] } then { ++ unsupported "compressed debug sections" ++ return ++} ++ ++set testname "objcopy compress empty debug sections" ++set got [binutils_run $OBJCOPY "--compress-debug-sections $testfile ${copyfile}.o"] ++if ![string match "" $got] then { ++ fail "objcopy ($testname)" ++} else { ++ send_log "cmp $testfile ${copyfile}.o\n" ++ verbose "cmp $testfile ${copyfile}.o" ++ set src1 ${testfile} ++ set src2 ${copyfile}.o ++ set status [remote_exec build cmp "${src1} ${src2}"] ++ set exec_output [lindex $status 1] ++ set exec_output [prune_warnings $exec_output] ++ ++ if [string match "" $exec_output] then { ++ pass "objcopy ($testname)" ++ } else { ++ send_log "$exec_output\n" ++ verbose "$exec_output" 1 ++ fail "objcopy ($testname)" ++ } ++} +diff --git a/binutils/testsuite/binutils-all/dw2-empty.S b/binutils/testsuite/binutils-all/dw2-empty.S +new file mode 100644 +index 0000000..1ff5f88 +--- /dev/null ++++ b/binutils/testsuite/binutils-all/dw2-empty.S +@@ -0,0 +1 @@ ++ .section .debug_line