OSDN Git Service

bfd/
[pf3gnuchains/pf3gnuchains4x.git] / bfd / elf-m10300.c
index c9a9848..c78f040 100644 (file)
@@ -620,8 +620,7 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
   bh = NULL;
   if (!(_bfd_generic_link_add_one_symbol
        (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
-        bed->got_symbol_offset, (const char *) NULL, FALSE,
-        bed->collect, &bh)))
+        0, (const char *) NULL, FALSE, bed->collect, &bh)))
     return FALSE;
   h = (struct elf_link_hash_entry *) bh;
   h->def_regular = 1;
@@ -634,7 +633,7 @@ _bfd_mn10300_elf_create_got_section (abfd, info)
   elf_hash_table (info)->hgot = h;
 
   /* The first bit of the global offset table is the header.  */
-  s->size += bed->got_header_size + bed->got_symbol_offset;
+  s->size += bed->got_header_size;
 
   return TRUE;
 }
@@ -809,7 +808,7 @@ mn10300_elf_check_relocs (abfd, info, sec, relocs)
          else
            {
              /* This is a global offset table entry for a local
-                symbol.  */
+                symbol.  */
              if (local_got_offsets == NULL)
                {
                  size_t       size;
@@ -1186,7 +1185,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
 
       bfd_put_32 (input_bfd, value, hit_data);
       return bfd_reloc_ok;
-      
+
     case R_MN10300_GOTPC16:
       /* Use global offset table as symbol value.  */
 
@@ -1207,7 +1206,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
       value -= bfd_get_section_by_name (dynobj,
                                        ".got")->output_section->vma;
       value += addend;
-      
+
       bfd_put_32 (input_bfd, value, hit_data);
       return bfd_reloc_ok;
 
@@ -1215,7 +1214,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
       value -= bfd_get_section_by_name (dynobj,
                                        ".got")->output_section->vma;
       value += addend;
-      
+
       if ((long) value > 0x7fffff || (long) value < -0x800000)
        return bfd_reloc_overflow;
 
@@ -1228,7 +1227,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
       value -= bfd_get_section_by_name (dynobj,
                                        ".got")->output_section->vma;
       value += addend;
-      
+
       if ((long) value > 0xffff || (long) value < -0x10000)
        return bfd_reloc_overflow;
 
@@ -1244,7 +1243,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
          asection * splt;
 
          splt = bfd_get_section_by_name (dynobj, ".plt");
-         
+
          value = (splt->output_section->vma
                   + splt->output_offset
                   + h->plt.offset) - value;
@@ -1267,7 +1266,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
          asection * splt;
 
          splt = bfd_get_section_by_name (dynobj, ".plt");
-         
+
          value = (splt->output_section->vma
                   + splt->output_offset
                   + h->plt.offset) - value;
@@ -1291,7 +1290,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
        asection * sgot;
 
        sgot = bfd_get_section_by_name (dynobj, ".got");
-       
+
          if (h != NULL)
            {
              bfd_vma off;
@@ -1373,7 +1372,7 @@ mn10300_elf_final_link_relocate (howto, input_bfd, output_bfd,
          return bfd_reloc_ok;
        }
       /* Fall through.  */
-      
+
     default:
       return bfd_reloc_notsupported;
     }
@@ -2383,7 +2382,7 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
              splt = bfd_get_section_by_name (elf_hash_table (link_info)
                                              ->dynobj, ".plt");
-         
+
              value = ((splt->output_section->vma
                        + splt->output_offset
                        + h->root.plt.offset)
@@ -2760,16 +2759,16 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
                  /* We can not relax 0x6b, 0x7b, 0x8b, 0x9b as no 24bit
                     equivalent instructions exists.  */
-                 if (code != 0x6b && code != 0x7b
+                 if (code != 0x6b && code != 0x7b
                      && code != 0x8b && code != 0x9b
                      && ((code & 0x0f) == 0x09 || (code & 0x0f) == 0x08
                          || (code & 0x0f) == 0x0a || (code & 0x0f) == 0x0b
                          || (code & 0x0f) == 0x0e))
                    {
                      /* Not safe if the high bit is on as relaxing may
-                        move the value out of high mem and thus not fit
-                        in a signed 8bit value.  This is currently over
-                        conservative.  */
+                        move the value out of high mem and thus not fit
+                        in a signed 8bit value.  This is currently over
+                        conservative.  */
                      if ((value & 0x80) == 0)
                        {
                          /* Note that we've changed the relocation contents,
@@ -2857,8 +2856,8 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
 
              if (code == 0xfe)
                {
-                 /* Get the second opcode.  */
-                 code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
+                 /* Get the second opcode.  */
+                 code = bfd_get_8 (abfd, contents + irel->r_offset - 2);
 
                  /* All the am33 32 -> 24 relaxing possibilities.  */
                  /* We can not relax 0x6b, 0x7b, 0x8b, 0x9b as no 24bit
@@ -2872,9 +2871,9 @@ mn10300_elf_relax_section (abfd, sec, link_info, again)
                          || (code & 0x0f) == 0x0e))
                    {
                      /* Not safe if the high bit is on as relaxing may
-                        move the value out of high mem and thus not fit
-                        in a signed 16bit value.  This is currently over
-                        conservative.  */
+                        move the value out of high mem and thus not fit
+                        in a signed 16bit value.  This is currently over
+                        conservative.  */
                      if ((value & 0x8000) == 0)
                        {
                          /* Note that we've changed the relocation contents,
@@ -3823,8 +3822,8 @@ _bfd_mn10300_elf_merge_private_bfd_data (ibfd, obfd)
       && bfd_get_mach (obfd) < bfd_get_mach (ibfd))
     {
       if (! bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
-                               bfd_get_mach (ibfd)))
-        return FALSE;
+                              bfd_get_mach (ibfd)))
+       return FALSE;
     }
 
   return TRUE;
@@ -4693,11 +4692,11 @@ _bfd_mn10300_elf_reloc_type_class (const Elf_Internal_Rela *rela)
 
 /* So we can set bits in e_flags.  */
 #define elf_backend_final_write_processing \
-                                        _bfd_mn10300_elf_final_write_processing
-#define elf_backend_object_p            _bfd_mn10300_elf_object_p
+                                       _bfd_mn10300_elf_final_write_processing
+#define elf_backend_object_p           _bfd_mn10300_elf_object_p
 
 #define bfd_elf32_bfd_merge_private_bfd_data \
-                                        _bfd_mn10300_elf_merge_private_bfd_data
+                                       _bfd_mn10300_elf_merge_private_bfd_data
 
 #define elf_backend_can_gc_sections    1
 #define elf_backend_create_dynamic_sections \