* elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
authorDaniel Jacobowitz <drow@false.org>
Tue, 24 Feb 2009 00:26:40 +0000 (00:26 +0000)
committerDaniel Jacobowitz <drow@false.org>
Tue, 24 Feb 2009 00:26:40 +0000 (00:26 +0000)
Fix formatting.
(arm_size_one_stub): Remove unnecessary break.
(arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.

bfd/ChangeLog
bfd/elf32-arm.c

index dbf1d0c24174bc2bac5f9d0accd7b3648aef1ced..c9c186462554088648cd13c3099ffff27e70bde8 100644 (file)
@@ -1,4 +1,11 @@
-2009-02-20  Christophe Lyon  <christophe.lyon@st.com>
+2009-02-23  Daniel Jacobowitz  <dan@codesourcery.com>
+
+       * elf32-arm.c (arm_build_one_stub): Initialize stub_reloc_offset.
+       Fix formatting.
+       (arm_size_one_stub): Remove unnecessary break.
+       (arm_map_one_stub): Fix formatting.  Return after BFD_FAIL.
+
+2009-02-23  Christophe Lyon  <christophe.lyon@st.com>
 
        * elf32-arm.c (stub_insn_type): New type.
        (stub_reloc_type): Likewise.
index 919d4585396522a4b99ba7057644cde1fd9767f1..9f4911c41dacdb2bdd47f9ec53d31e03e85d2bd3 100644 (file)
@@ -3151,7 +3151,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
   int i;
   struct elf32_arm_link_hash_table * globals;
   int stub_reloc_idx = -1;
-  int stub_reloc_offset;
+  int stub_reloc_offset = 0;
 
   /* Massage our args to the form they really have.  */
   stub_entry = (struct elf32_arm_stub_hash_entry *) gen_entry;
@@ -3183,7 +3183,7 @@ arm_build_one_stub (struct bfd_hash_entry *gen_entry,
   size = 0;
   for (i = 0; i < template_size; i++)
     {
-      switch(template[i].type)
+      switch (template[i].type)
        {
        case THUMB16_TYPE:
          put_thumb_insn (globals, stub_bfd, template[i].data, loc + size);
@@ -3284,13 +3284,12 @@ arm_size_one_stub (struct bfd_hash_entry *gen_entry,
     default:
       BFD_FAIL ();
       return FALSE;
-      break;
     }
 
   size = 0;
   for (i = 0; i < template_size; i++)
     {
-      switch(template[i].type)
+      switch (template[i].type)
        {
        case THUMB16_TYPE:
          size += 2;
@@ -11716,7 +11715,7 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
   stub_name = stub_entry->output_name;
 
   template = stub_entry->stub_template;
-  switch(template[0].type)
+  switch (template[0].type)
     {
     case ARM_TYPE:
       if (!elf32_arm_output_stub_sym (osi, stub_name, addr, stub_entry->stub_size))
@@ -11729,13 +11728,14 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
       break;
     default:
       BFD_FAIL ();
+      return FALSE;
     }
 
   prev_type = DATA_TYPE;
   size = 0;
   for (i = 0; i < stub_entry->stub_template_size; i++)
     {
-      switch(template[i].type)
+      switch (template[i].type)
        {
        case ARM_TYPE:
          sym_type = ARM_MAP_ARM;
@@ -11751,6 +11751,7 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
 
        default:
          BFD_FAIL ();
+         return FALSE;
        }
 
       if (template[i].type != prev_type)
@@ -11760,7 +11761,7 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
            return FALSE;
        }
 
-      switch(template[i].type)
+      switch (template[i].type)
        {
        case ARM_TYPE:
          size += 4;
@@ -11776,6 +11777,7 @@ arm_map_one_stub (struct bfd_hash_entry * gen_entry,
 
        default:
          BFD_FAIL ();
+         return FALSE;
        }
     }
 
This page took 0.038334 seconds and 4 git commands to generate.