svn commit: r275336 - head/contrib/binutils/bfd

Andrew Turner andrew at FreeBSD.org
Sun Nov 30 17:27:25 UTC 2014


Author: andrew
Date: Sun Nov 30 17:27:24 2014
New Revision: 275336
URL: https://svnweb.freebsd.org/changeset/base/275336

Log:
  Use llabs when getting the absolute value of a long long.
  
  Sponsored by:	ABT Ststems Ltd

Modified:
  head/contrib/binutils/bfd/elf32-arm.c

Modified: head/contrib/binutils/bfd/elf32-arm.c
==============================================================================
--- head/contrib/binutils/bfd/elf32-arm.c	Sun Nov 30 16:36:26 2014	(r275335)
+++ head/contrib/binutils/bfd/elf32-arm.c	Sun Nov 30 17:27:24 2014	(r275336)
@@ -4960,7 +4960,7 @@ elf32_arm_final_link_relocate (reloc_how
 		       + input_section->output_offset
 		       + rel->r_offset);
 
-        value = abs (relocation);
+        value = llabs (relocation);
 
         if (value >= 0x1000)
           return bfd_reloc_overflow;
@@ -4998,7 +4998,7 @@ elf32_arm_final_link_relocate (reloc_how
 		       + input_section->output_offset
 		       + rel->r_offset);
 
-        value = abs (relocation);
+        value = llabs (relocation);
 
         if (value >= 0x1000)
           return bfd_reloc_overflow;
@@ -5984,7 +5984,7 @@ elf32_arm_final_link_relocate (reloc_how
 
         /* Calculate the value of the relevant G_n, in encoded
            constant-with-rotation format.  */
-        g_n = calculate_group_reloc_mask (abs (signed_value), group,
+        g_n = calculate_group_reloc_mask (llabs (signed_value), group,
                                           &residual);
 
         /* Check for overflow if required.  */
@@ -5998,7 +5998,7 @@ elf32_arm_final_link_relocate (reloc_how
             (*_bfd_error_handler)
               (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
               input_bfd, input_section,
-              (long) rel->r_offset, abs (signed_value), howto->name);
+              (long) rel->r_offset, llabs (signed_value), howto->name);
             return bfd_reloc_overflow;
           }
 
@@ -6077,7 +6077,7 @@ elf32_arm_final_link_relocate (reloc_how
 
         /* Calculate the value of the relevant G_{n-1} to obtain
            the residual at that stage.  */
-        calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+        calculate_group_reloc_mask (llabs (signed_value), group - 1, &residual);
 
         /* Check for overflow.  */
         if (residual >= 0x1000)
@@ -6085,7 +6085,7 @@ elf32_arm_final_link_relocate (reloc_how
             (*_bfd_error_handler)
               (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
               input_bfd, input_section,
-              (long) rel->r_offset, abs (signed_value), howto->name);
+              (long) rel->r_offset, llabs (signed_value), howto->name);
             return bfd_reloc_overflow;
           }
 
@@ -6160,7 +6160,7 @@ elf32_arm_final_link_relocate (reloc_how
 
         /* Calculate the value of the relevant G_{n-1} to obtain
            the residual at that stage.  */
-        calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+        calculate_group_reloc_mask (llabs (signed_value), group - 1, &residual);
 
         /* Check for overflow.  */
         if (residual >= 0x100)
@@ -6168,7 +6168,7 @@ elf32_arm_final_link_relocate (reloc_how
             (*_bfd_error_handler)
               (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
               input_bfd, input_section,
-              (long) rel->r_offset, abs (signed_value), howto->name);
+              (long) rel->r_offset, llabs (signed_value), howto->name);
             return bfd_reloc_overflow;
           }
 
@@ -6243,7 +6243,7 @@ elf32_arm_final_link_relocate (reloc_how
 
         /* Calculate the value of the relevant G_{n-1} to obtain
            the residual at that stage.  */
-        calculate_group_reloc_mask (abs (signed_value), group - 1, &residual);
+        calculate_group_reloc_mask (llabs (signed_value), group - 1, &residual);
 
         /* Check for overflow.  (The absolute value to go in the place must be
            divisible by four and, after having been divided by four, must
@@ -6253,7 +6253,7 @@ elf32_arm_final_link_relocate (reloc_how
             (*_bfd_error_handler)
               (_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
               input_bfd, input_section,
-              (long) rel->r_offset, abs (signed_value), howto->name);
+              (long) rel->r_offset, llabs (signed_value), howto->name);
             return bfd_reloc_overflow;
           }
 


More information about the svn-src-all mailing list