* coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
authorAlan Modra <amodra@gmail.com>
Thu, 4 Dec 2003 12:08:42 +0000 (12:08 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 4 Dec 2003 12:08:42 +0000 (12:08 +0000)
* elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
(mn10300_elf_relax_section): Likewise.
* nlm32-alpha.c (ONES): Define.
(nlm32_alpha_howto_table): Use it to avoid warnings.

bfd/ChangeLog
bfd/coff-i860.c
bfd/elf-m10300.c
bfd/nlm32-alpha.c

index 95097af019293b40dab6f7a500e44e9176f0e8c9..a62052f8f6b9082d5cfb46726c950cf64f376e03 100644 (file)
@@ -1,3 +1,11 @@
+2003-12-04  Alan Modra  <amodra@bigpond.net.au>
+
+       * coff-i860.c (coff_i860_reloc_nyi): Return bfd_reloc_not_supported.
+       * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Warning fixes.
+       (mn10300_elf_relax_section): Likewise.
+       * nlm32-alpha.c (ONES): Define.
+       (nlm32_alpha_howto_table): Use it to avoid warnings.
+
 2003-12-04  Alan Modra  <amodra@bigpond.net.au>
 
        * elf32-i386.c (elf_i386_object_p): Delete.
index db77a2cda49766e7b401c9a9d31bf5d875068ee6..edc9f4e6a2780b5b2f5cbb333a0c330f3424c99e 100644 (file)
@@ -140,6 +140,7 @@ coff_i860_reloc_nyi (bfd *abfd ATTRIBUTE_UNUSED,
 {
   reloc_howto_type *howto = reloc_entry->howto;
   fprintf (stderr, _("Relocation `%s' not yet implemented\n"), howto->name);
+  return bfd_reloc_notsupported;
 }
 
 #ifndef PCRELOFFSET
index aa8fd0dd289b9ab01ada8e89db6baa44d0ed1257..f628e760bd588ce8561763800e094ef5eb14b8b8 100644 (file)
@@ -1743,10 +1743,13 @@ elf32_mn10300_finish_hash_table_entry (gen_entry, in_args)
     byte_count += 2;
 
   /* Count the insn to allocate stack space too.  */
-  if (entry->stack_size > 0 && entry->stack_size <= 128)
-    byte_count += 3;
-  else if (entry->stack_size > 0 && entry->stack_size < 256)
-    byte_count += 4;
+  if (entry->stack_size > 0)
+    {
+      if (entry->stack_size <= 128)
+       byte_count += 3;
+      else
+       byte_count += 4;
+    }
 
   /* If using "call" will result in larger code, then turn all
      the associated "call" instructions into "calls" instructions.  */
@@ -2238,11 +2241,13 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
                      if (sym_hash->movm_args)
                        bytes += 2;
 
-                     if (sym_hash->stack_size && sym_hash->stack_size <= 128)
-                       bytes += 3;
-                     else if (sym_hash->stack_size
-                              && sym_hash->stack_size < 256)
-                       bytes += 4;
+                     if (sym_hash->stack_size > 0)
+                       {
+                         if (sym_hash->stack_size <= 128)
+                           bytes += 3;
+                         else
+                           bytes += 4;
+                       }
 
                      /* Note that we've deleted prologue bytes for this
                         function.  */
@@ -2290,11 +2295,13 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
                      if (sym_hash->movm_args)
                        bytes += 2;
 
-                     if (sym_hash->stack_size && sym_hash->stack_size <= 128)
-                       bytes += 3;
-                     else if (sym_hash->stack_size
-                              && sym_hash->stack_size < 256)
-                       bytes += 4;
+                     if (sym_hash->stack_size > 0)
+                       {
+                         if (sym_hash->stack_size <= 128)
+                           bytes += 3;
+                         else
+                           bytes += 4;
+                       }
 
                      /* Note that we've deleted prologue bytes for this
                         function.  */
index bcaa6abaefd69eadc18879aca9762d59fab4ccb1..990ce8d5a7aa46f40e9901a5e011484d151c2b77 100644 (file)
@@ -97,6 +97,8 @@ nlm_alpha_write_prefix (abfd)
   return TRUE;
 }
 \f
+#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