Use llabs when getting the absolute value of a long long.
Sponsored by: ABT Ststems Ltd
This commit is contained in:
parent
abec64bc76
commit
da063e9d8c
@ -4960,7 +4960,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
|
|||||||
+ input_section->output_offset
|
+ input_section->output_offset
|
||||||
+ rel->r_offset);
|
+ rel->r_offset);
|
||||||
|
|
||||||
value = abs (relocation);
|
value = llabs (relocation);
|
||||||
|
|
||||||
if (value >= 0x1000)
|
if (value >= 0x1000)
|
||||||
return bfd_reloc_overflow;
|
return bfd_reloc_overflow;
|
||||||
@ -4998,7 +4998,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
|
|||||||
+ input_section->output_offset
|
+ input_section->output_offset
|
||||||
+ rel->r_offset);
|
+ rel->r_offset);
|
||||||
|
|
||||||
value = abs (relocation);
|
value = llabs (relocation);
|
||||||
|
|
||||||
if (value >= 0x1000)
|
if (value >= 0x1000)
|
||||||
return bfd_reloc_overflow;
|
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
|
/* Calculate the value of the relevant G_n, in encoded
|
||||||
constant-with-rotation format. */
|
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);
|
&residual);
|
||||||
|
|
||||||
/* Check for overflow if required. */
|
/* Check for overflow if required. */
|
||||||
@ -5998,7 +5998,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
|
|||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
||||||
input_bfd, input_section,
|
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;
|
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
|
/* Calculate the value of the relevant G_{n-1} to obtain
|
||||||
the residual at that stage. */
|
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. */
|
/* Check for overflow. */
|
||||||
if (residual >= 0x1000)
|
if (residual >= 0x1000)
|
||||||
@ -6085,7 +6085,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
|
|||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
||||||
input_bfd, input_section,
|
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;
|
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
|
/* Calculate the value of the relevant G_{n-1} to obtain
|
||||||
the residual at that stage. */
|
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. */
|
/* Check for overflow. */
|
||||||
if (residual >= 0x100)
|
if (residual >= 0x100)
|
||||||
@ -6168,7 +6168,7 @@ elf32_arm_final_link_relocate (reloc_howto_type * howto,
|
|||||||
(*_bfd_error_handler)
|
(*_bfd_error_handler)
|
||||||
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
||||||
input_bfd, input_section,
|
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;
|
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
|
/* Calculate the value of the relevant G_{n-1} to obtain
|
||||||
the residual at that stage. */
|
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
|
/* Check for overflow. (The absolute value to go in the place must be
|
||||||
divisible by four and, after having been divided by four, must
|
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)
|
(*_bfd_error_handler)
|
||||||
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
(_("%B(%A+0x%lx): Overflow whilst splitting 0x%lx for group relocation %s"),
|
||||||
input_bfd, input_section,
|
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;
|
return bfd_reloc_overflow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user