2010-01-25 Doug Kwan <dougkwan@google.com>
authorDoug Kwan <dougkwan@google.com>
Mon, 25 Jan 2010 17:30:29 +0000 (17:30 +0000)
committerDoug Kwan <dougkwan@google.com>
Mon, 25 Jan 2010 17:30:29 +0000 (17:30 +0000)
* arm.cc (Arm_exidx_merged_section::do_output_offset):
Fix warning due to signed and unsigned comparison on a 32-bit host.

gold/ChangeLog
gold/arm.cc

index 94f2585c3a7529ebc8ac6187afec9a9e36301567..a29b25be3f9dc2ada286f7979ebd450b2bf1e6de 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-25  Doug Kwan  <dougkwan@google.com>
+
+       * arm.cc (Arm_exidx_merged_section::do_output_offset):
+       Fix warning due to signed and unsigned comparison on a 32-bit host.
+
 2010-01-22  Doug Kwan  <dougkwan@google.com>
 
        * arm.cc (Target_arm::do_relax): Record an output section for section
index 03f59f69756d80bd2d82f1c0e56a16af02cd84a2..36ff359b21260a53b1949aab3db60f7b13c4e8c3 100644 (file)
@@ -4587,7 +4587,9 @@ Arm_exidx_merged_section::do_output_offset(
       || shndx != this->exidx_input_section_.shndx())
     return false;
 
-  if (offset < 0 || offset >= this->exidx_input_section_.size())
+  section_offset_type section_size =
+    convert_types<section_offset_type>(this->exidx_input_section_.size());
+  if (offset < 0 || offset >= section_size)
     // Input offset is out of valid range.
     *poutput = -1;
   else