[gold patch] Add incremental link support for debug sections

Cary Coutant ccoutant@google.com
Tue Aug 30 10:28:00 GMT 2011


> on i686-fedora16pre-linux-gnu (gcc-4.6.1-8.fc16.i686) getting:
>
> output.cc: In member function ‘virtual void gold::Output_fill_debug_info::do_write(gold::Output_file*, off_t, size_t) const’:
> output.cc:1952:3: error: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘off_t {aka long long int}’ [-Werror=format]
> ...

Sorry! Applying the following patch as obvious...

-cary


	* output.cc: (Output_fill_debug_info::do_minimum_hole_size): Add
	casts to match formatting specs.
	(Output_fill_debug_line::do_minimum_hole_size): Likewise.


Index: output.cc
===================================================================
RCS file: /cvs/src/src/gold/output.cc,v
retrieving revision 1.157
diff -u -p -r1.157 output.cc
--- output.cc	27 Aug 2011 01:28:17 -0000	1.157
+++ output.cc	29 Aug 2011 18:09:58 -0000
@@ -1949,7 +1949,8 @@ Output_fill_debug_info::do_minimum_hole_
 void
 Output_fill_debug_info::do_write(Output_file* of, off_t off, size_t len) const
 {
-  gold_debug(DEBUG_INCREMENTAL, "fill_debug_info(%08lx, %08lx)", off, len);
+  gold_debug(DEBUG_INCREMENTAL, "fill_debug_info(%08lx, %08lx)",
+	     static_cast<long>(off), static_cast<long>(len));

   gold_assert(len >= this->do_minimum_hole_size());

@@ -2005,7 +2006,8 @@ Output_fill_debug_line::do_minimum_hole_
 void
 Output_fill_debug_line::do_write(Output_file* of, off_t off, size_t len) const
 {
-  gold_debug(DEBUG_INCREMENTAL, "fill_debug_line(%08lx, %08lx)", off, len);
+  gold_debug(DEBUG_INCREMENTAL, "fill_debug_line(%08lx, %08lx)",
+	     static_cast<long>(off), static_cast<long>(len));

   gold_assert(len >= this->do_minimum_hole_size());



More information about the Binutils mailing list