MFC 275336:

Use llabs when getting the absolute value of a long long.

Sponsored by:	ABT Ststems Ltd
This commit is contained in:
andrew 2014-12-14 17:28:02 +00:00
parent 90fc0dee7a
commit 23e47daf28

View File

@ -4960,7 +4960,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
+ 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_howto_type * howto,
+ 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_howto_type * howto,
/* 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_howto_type * howto,
(*_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_howto_type * howto,
/* 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_howto_type * howto,
(*_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_howto_type * howto,
/* 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_howto_type * howto,
(*_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_howto_type * howto,
/* 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_howto_type * howto,
(*_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;
}