aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-arm.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-06-28 16:57:24 +0000
committerRoland McGrath <roland@gnu.org>2012-06-28 16:57:24 +0000
commit6034aab8a1f9f470398ca1f99ccc0811ece2087e (patch)
tree527d45191426746ffcf8daa7eec84dfba0dd233b /bfd/elf32-arm.c
parente5ef252af07bfbf40e78b0ebcc5eef2e3b0af7a3 (diff)
downloadgdb-6034aab8a1f9f470398ca1f99ccc0811ece2087e.zip
gdb-6034aab8a1f9f470398ca1f99ccc0811ece2087e.tar.gz
gdb-6034aab8a1f9f470398ca1f99ccc0811ece2087e.tar.bz2
bfd/
* elf32-arm.c (elf32_arm_populate_plt_entry): Use int32_t for displacement calculation in nacl_p case.
Diffstat (limited to 'bfd/elf32-arm.c')
-rw-r--r--bfd/elf32-arm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 826dd7e..4ac0a9d 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -23,6 +23,7 @@
#include <limits.h>
#include "bfd.h"
+#include "bfd_stdint.h"
#include "libiberty.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -7629,7 +7630,7 @@ elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info,
{
/* Calculate the displacement between the PLT slot and the
common tail that's part of the special initial PLT slot. */
- bfd_vma tail_displacement
+ int32_t tail_displacement
= ((splt->output_section->vma + splt->output_offset
+ ARM_NACL_PLT_TAIL_OFFSET)
- (plt_address + htab->plt_entry_size + 4));
@@ -7642,7 +7643,8 @@ elf32_arm_populate_plt_entry (bfd *output_bfd, struct bfd_link_info *info,
/* Calculate the displacement between the PLT slot and the entry
in the GOT. The offset accounts for the value produced by
adding to pc in the penultimate instruction of the PLT stub. */
- got_displacement = got_address - (plt_address + htab->plt_entry_size);
+ got_displacement = (got_address
+ - (plt_address + htab->plt_entry_size));
/* NaCl does not support interworking at all. */
BFD_ASSERT (!elf32_arm_plt_needs_thumb_stub_p (info, arm_plt));
@@ -10982,7 +10984,7 @@ bfd_arm_get_mach_from_attributes (bfd * abfd)
return bfd_mach_arm_iWMMXt2;
if (strcmp (name, "IWMMXT") == 0)
- return bfd_mach_arm_iWMMXt;
+ return bfd_mach_arm_iWMMXt;
}
return bfd_mach_arm_5TE;