[Bug ld/4992] New: ld: --print-gc-sections + --verbose = mess

2007-09-05 Thread vda dot linux at googlemail dot com
ld version 2.18 introduced --print-gc-sections, and it seems
to have problem coexisting with --verbose.

This is what I see in the build log when I redirect both stdout and stderr to a
file:

(arch/x86_64/lib/lib.a)rwlock.o
(arch/x86_64/lib/lib.a)thunk.o
(arch/x86_64/lib/lib.a)usercopy.o
attempt to openx86_64-pc-linux-gnu-ld: Removing unused section
'.bss.Version_132631' in file 'init/built-in.o'
x86_64-pc-linux-gnu-ld: Removing unused section '.text.bad_intr' in file
'arch/x86_64/kernel/built-in.o'
x86_64-pc-linux-gnu-ld: Removing unused section '.text.do_device_not_available'
in file 'arch/x86_64/kernel/built-in.o'
x86_64-pc-linux-gnu-ld: Removing unused section '.text.check_tsc_unstable' in
file 'arch/x86_64/kernel/built-in.o'
...
...
...
x86_64-pc-linux-gnu-ld: Removing unused section '.bss.tr_table' in file
'net/built-in.o'
x86_64-pc-linux-gnu-ld: Removing unused section '.eh_frame' in file
'arch/x86_64/lib/lib.a(csum-copy.o)'
 lib/built-in.o succeeded
lib/built-in.o
attempt to open arch/x86_64/lib/built-in.o succeeded


"attempt to open lib/built-in.o succeeded" was printed to stdout,
and due to stdout being fully-buffered when redirected to a file,
it got split in mid-line by output to stderr here:

bfd/elflink.c:

  if (info->print_gc_sections && o->size != 0)
_bfd_error_handler (_("Removing unused section '%s' in file '%B'"),
sub, o->name);

The fix is to either make _bfd_error_handler() always do
fflush(stdout) internally before printing to stderr,
or to do setlinebuf(stdout) at the very beginning of ld's main().

-- 
   Summary: ld: --print-gc-sections + --verbose = mess
   Product: binutils
   Version: 2.18
Status: NEW
  Severity: normal
  Priority: P2
 Component: ld
AssignedTo: unassigned at sources dot redhat dot com
ReportedBy: vda dot linux at googlemail dot com
CC: bug-binutils at gnu dot org
 GCC build triplet: any
  GCC host triplet: any
GCC target triplet: any


http://sourceware.org/bugzilla/show_bug.cgi?id=4992

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/4986] gas emits duplicate .loc directive from gcc 3.4.6

2007-09-05 Thread hjl at lucon dot org

--- Additional Comments From hjl at lucon dot org  2007-09-05 19:44 ---
Fixed.

-- 
   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://sourceware.org/bugzilla/show_bug.cgi?id=4986

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils