aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-d30v.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2000-04-13 01:08:05 +0000
committerAlan Modra <amodra@gmail.com>2000-04-13 01:08:05 +0000
commitfc633e5b9780011f74f2c23837968e43e262a239 (patch)
tree5ccc69c4b1e69941727cee9ebe0a9a7fcd31de32 /bfd/elf32-d30v.c
parent3db10f32e0e0cbf960edcdf6ed42ccb3bc7c4952 (diff)
downloadgdb-fc633e5b9780011f74f2c23837968e43e262a239.zip
gdb-fc633e5b9780011f74f2c23837968e43e262a239.tar.gz
gdb-fc633e5b9780011f74f2c23837968e43e262a239.tar.bz2
Remove U suffix from constants for K&R compilers.
Fix a couple of 64 bit nits.
Diffstat (limited to 'bfd/elf32-d30v.c')
-rw-r--r--bfd/elf32-d30v.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/bfd/elf32-d30v.c b/bfd/elf32-d30v.c
index 263b5c0..601fb95 100644
--- a/bfd/elf32-d30v.c
+++ b/bfd/elf32-d30v.c
@@ -1,5 +1,5 @@
/* D30V-specific support for 32-bit ELF
- Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1997, 98, 99, 2000 Free Software Foundation, Inc.
Contributed by Martin Hunt (hunt@cygnus.com).
This file is part of BFD, the Binary File Descriptor library.
@@ -263,8 +263,8 @@ static reloc_howto_type elf_d30v_howto_table[] =
};
-#define MIN32 (long long)0xffffffff80000000LL
-#define MAX32 0x7fffffffLL
+#define MAX32 ((bfd_signed_vma) 0x7fffffff)
+#define MIN32 (- MAX32 - 1)
static bfd_reloc_status_type
bfd_elf_d30v_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd, error_message)
@@ -276,7 +276,7 @@ bfd_elf_d30v_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
bfd *output_bfd;
char **error_message;
{
- long long relocation;
+ bfd_signed_vma relocation;
bfd_vma in1, in2, num;
bfd_vma tmp_addr = 0;
bfd_reloc_status_type r;
@@ -360,15 +360,10 @@ bfd_elf_d30v_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
if (howto->pc_relative == true && howto->bitsize == 32)
{
- /* the D30V has a PC that doesn't wrap and PC-relative jumps */
- /* are signed, so a PC-relative jump can'tbe more than +/- 2^31 byrtes */
- /* if one exceeds this, change it to an absolute jump */
- if (relocation > MAX32)
- {
- relocation = (relocation + tmp_addr) & 0xffffffff;
- make_absolute = 1;
- }
- else if (relocation < MIN32)
+ /* The D30V has a PC that doesn't wrap and PC-relative jumps are
+ signed, so a PC-relative jump can't be more than +/- 2^31 bytes.
+ If one exceeds this, change it to an absolute jump. */
+ if (relocation > MAX32 || relocation < MIN32)
{
relocation = (relocation + tmp_addr) & 0xffffffff;
make_absolute = 1;