aboutsummaryrefslogtreecommitdiff
path: root/bfd/nlm32-alpha.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/nlm32-alpha.c')
-rw-r--r--bfd/nlm32-alpha.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/bfd/nlm32-alpha.c b/bfd/nlm32-alpha.c
index bcaa6ab..990ce8d 100644
--- a/bfd/nlm32-alpha.c
+++ b/bfd/nlm32-alpha.c
@@ -97,6 +97,8 @@ nlm_alpha_write_prefix (abfd)
return TRUE;
}
+#define ONES(n) (((bfd_vma) 1 << ((n) - 1) << 1) - 1)
+
/* How to process the various reloc types. */
static reloc_howto_type nlm32_alpha_howto_table[] =
@@ -144,8 +146,8 @@ static reloc_howto_type nlm32_alpha_howto_table[] =
0, /* special_function */
"REFQUAD", /* name */
TRUE, /* partial_inplace */
- 0xffffffffffffffff, /* src_mask */
- 0xffffffffffffffff, /* dst_mask */
+ ONES (64), /* src_mask */
+ ONES (64), /* dst_mask */
FALSE), /* pcrel_offset */
/* A 32 bit GP relative offset. This is just like REFLONG except
@@ -304,8 +306,8 @@ static reloc_howto_type nlm32_alpha_howto_table[] =
0, /* special_function */
"SREL64", /* name */
TRUE, /* partial_inplace */
- 0xffffffffffffffff, /* src_mask */
- 0xffffffffffffffff, /* dst_mask */
+ ONES (64), /* src_mask */
+ ONES (64), /* dst_mask */
FALSE), /* pcrel_offset */
/* Push a value on the reloc evaluation stack. */
@@ -336,7 +338,7 @@ static reloc_howto_type nlm32_alpha_howto_table[] =
"OP_STORE", /* name */
FALSE, /* partial_inplace */
0, /* src_mask */
- 0xffffffffffffffff, /* dst_mask */
+ ONES (64), /* dst_mask */
FALSE), /* pcrel_offset */
/* Subtract the reloc address from the value on the top of the