diff options
author | Doug Kwan <dougkwan@google.com> | 2009-10-16 18:34:53 +0000 |
---|---|---|
committer | Doug Kwan <dougkwan@google.com> | 2009-10-16 18:34:53 +0000 |
commit | 64b1ae3731ea1d8ffe5bcd0a4b1046921c869fa4 (patch) | |
tree | 73dd5e2723c8a8fae66ea921d56b793d3125d5d3 /gold | |
parent | 5d0c4f10ecf5eaa55524db79289f818c02ca2992 (diff) | |
download | gdb-64b1ae3731ea1d8ffe5bcd0a4b1046921c869fa4.zip gdb-64b1ae3731ea1d8ffe5bcd0a4b1046921c869fa4.tar.gz gdb-64b1ae3731ea1d8ffe5bcd0a4b1046921c869fa4.tar.bz2 |
2009-10-16 Doug Kwan <dougkwan@google.com>
* output.cc (Output_segment::set_section_list_address): Cast
expressions to unsigned long long type to avoid format warnings.
Diffstat (limited to 'gold')
-rw-r--r-- | gold/ChangeLog | 5 | ||||
-rw-r--r-- | gold/output.cc | 13 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog index cb32549..a18cf54 100644 --- a/gold/ChangeLog +++ b/gold/ChangeLog @@ -1,3 +1,8 @@ +2009-10-16 Doug Kwan <dougkwan@google.com> + + * output.cc (Output_segment::set_section_list_address): Cast + expressions to unsigned long long type to avoid format warnings. + 2009-10-15 Ian Lance Taylor <iant@google.com> * script.cc (Script_options::add_symbol_assignment): Always add a diff --git a/gold/output.cc b/gold/output.cc index e2d7585..29dad2b 100644 --- a/gold/output.cc +++ b/gold/output.cc @@ -3503,15 +3503,20 @@ Output_segment::set_section_list_addresses(const Layout* layout, bool reset, else { Output_section* os = (*p)->output_section(); + + // Cast to unsigned long long to avoid format warnings. + unsigned long long previous_dot = + static_cast<unsigned long long>(addr + (off - startoff)); + unsigned long long dot = + static_cast<unsigned long long>((*p)->address()); + if (os == NULL) gold_error(_("dot moves backward in linker script " - "from 0x%llx to 0x%llx"), - addr + (off - startoff), (*p)->address()); + "from 0x%llx to 0x%llx"), previous_dot, dot); else gold_error(_("address of section '%s' moves backward " "from 0x%llx to 0x%llx"), - os->name(), addr + (off - startoff), - (*p)->address()); + os->name(), previous_dot, dot); } } (*p)->set_file_offset(off); |