summaryrefslogtreecommitdiff
path: root/bfd/elf32-mips.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2001-09-21 14:25:09 +0000
committerNick Clifton <nickc@redhat.com>2001-09-21 14:25:09 +0000
commit6a22fa997f6726d28327d0c1a4d52272b8c3fafc (patch)
tree820d8f58dca6ee417785c2ee8d7e071b8173cbe3 /bfd/elf32-mips.c
parent32056569e11045e0f7898d6e3aa205a1f05685f9 (diff)
downloadgdb-6a22fa997f6726d28327d0c1a4d52272b8c3fafc.tar.gz
Fix compile time warnings
Diffstat (limited to 'bfd/elf32-mips.c')
-rw-r--r--bfd/elf32-mips.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 3a4feb915f1..bba115f8d2d 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -323,7 +323,7 @@ static bfd *reldyn_sorting_bfd;
#else
#define MIPS_ELF_ADD_DYNAMIC_ENTRY(info, tag, val) \
(ABI_64_P (elf_hash_table (info)->dynobj) \
- ? (abort (), false) \
+ ? (boolean) (abort (), false) \
: bfd_elf32_add_dynamic_entry (info, (bfd_vma) tag, (bfd_vma) val))
#endif
@@ -6562,7 +6562,7 @@ mips_elf_obtain_contents (howto, relocation, input_bfd, contents)
bfd_byte *location = contents + relocation->r_offset;
/* Obtain the bytes. */
- x = bfd_get (8 * bfd_get_reloc_size (howto), input_bfd, location);
+ x = bfd_get (((bfd_vma)(8 * bfd_get_reloc_size (howto))), input_bfd, location);
if ((ELF32_R_TYPE (relocation->r_info) == R_MIPS16_26
|| ELF32_R_TYPE (relocation->r_info) == R_MIPS16_GPREL)
@@ -6981,7 +6981,11 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma high_bits;
if (addend & ((bfd_vma) 1 << 31))
+#ifdef BFD64
sign_bits = ((bfd_vma) 1 << 32) - 1;
+#else
+ sign_bits = -1;
+#endif
else
sign_bits = 0;
@@ -7103,7 +7107,11 @@ _bfd_mips_elf_relocate_section (output_bfd, info, input_bfd, input_section,
bfd_vma high_bits;
if (value & ((bfd_vma) 1 << 31))
+#ifdef BFD64
sign_bits = ((bfd_vma) 1 << 32) - 1;
+#else
+ sign_bits = -1;
+#endif
else
sign_bits = 0;