]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - bfd/elf32-h8300.c
Correct spelling of "relocatable".
[thirdparty/binutils-gdb.git] / bfd / elf32-h8300.c
index 30db68f21198d907e5401398cf405b92514e986f..1b623f27f21edc6df3578956589cba0e0952ec01 100644 (file)
@@ -69,8 +69,8 @@ static reloc_howto_type h8_elf_howto_table[] = {
         0,                     /* bitsize */
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_dont, /* complain_on_overflow */
-        special,                       /* special_function */
+        complain_overflow_dont,/* complain_on_overflow */
+        special,               /* special_function */
         "R_H8_NONE",           /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
@@ -83,8 +83,8 @@ static reloc_howto_type h8_elf_howto_table[] = {
         32,                    /* bitsize */
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_dont, /* complain_on_overflow */
-        special,                       /* special_function */
+        complain_overflow_dont,/* complain_on_overflow */
+        special,               /* special_function */
         "R_H8_DIR32",          /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
@@ -97,8 +97,8 @@ static reloc_howto_type h8_elf_howto_table[] = {
         16,                    /* bitsize */
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_dont, /* complain_on_overflow */
-        special,                       /* special_function */
+        complain_overflow_dont,/* complain_on_overflow */
+        special,               /* special_function */
         "R_H8_DIR16",          /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
@@ -111,9 +111,9 @@ static reloc_howto_type h8_elf_howto_table[] = {
         8,                     /* bitsize */
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_dont, /* complain_on_overflow */
-        special,                       /* special_function */
-        "R_H8_DIR16",          /* name */
+        complain_overflow_dont,/* complain_on_overflow */
+        special,               /* special_function */
+        "R_H8_DIR8",           /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
         0x000000ff,            /* dst_mask */
@@ -126,7 +126,7 @@ static reloc_howto_type h8_elf_howto_table[] = {
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
         complain_overflow_bitfield, /* complain_on_overflow */
-        special,                       /* special_function */
+        special,               /* special_function */
         "R_H8_DIR16A8",        /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
@@ -140,7 +140,7 @@ static reloc_howto_type h8_elf_howto_table[] = {
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
         complain_overflow_bitfield, /* complain_on_overflow */
-        special,                       /* special_function */
+        special,               /* special_function */
         "R_H8_DIR16R8",        /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
@@ -154,7 +154,7 @@ static reloc_howto_type h8_elf_howto_table[] = {
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
         complain_overflow_bitfield, /* complain_on_overflow */
-        special,                       /* special_function */
+        special,               /* special_function */
         "R_H8_DIR24A8",        /* name */
         TRUE,                  /* partial_inplace */
         0xff000000,            /* src_mask */
@@ -168,7 +168,7 @@ static reloc_howto_type h8_elf_howto_table[] = {
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
         complain_overflow_bitfield, /* complain_on_overflow */
-        special,                       /* special_function */
+        special,               /* special_function */
         "R_H8_DIR24R8",        /* name */
         TRUE,                  /* partial_inplace */
         0xff000000,            /* src_mask */
@@ -181,8 +181,8 @@ static reloc_howto_type h8_elf_howto_table[] = {
         32,                    /* bitsize */
         FALSE,                 /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_dont, /* complain_on_overflow */
-        special,                       /* special_function */
+        complain_overflow_dont,/* complain_on_overflow */
+        special,               /* special_function */
         "R_H8_DIR32",          /* name */
         FALSE,                 /* partial_inplace */
         0,                     /* src_mask */
@@ -195,8 +195,8 @@ static reloc_howto_type h8_elf_howto_table[] = {
         16,                    /* bitsize */
         TRUE,                  /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_signed, /* complain_on_overflow */
-        special,                       /* special_function */
+        complain_overflow_signed,/* complain_on_overflow */
+        special,               /* special_function */
         "R_H8_PCREL16",        /* name */
         FALSE,                 /* partial_inplace */
         0xffff,                /* src_mask */
@@ -209,8 +209,8 @@ static reloc_howto_type h8_elf_howto_table[] = {
         8,                     /* bitsize */
         TRUE,                  /* pc_relative */
         0,                     /* bitpos */
-        complain_overflow_signed, /* complain_on_overflow */
-        special,                       /* special_function */
+        complain_overflow_signed,/* complain_on_overflow */
+        special,               /* special_function */
         "R_H8_PCREL8",         /* name */
         FALSE,                 /* partial_inplace */
         0xff,                  /* src_mask */
@@ -426,7 +426,7 @@ elf32_h8_relocate_section (output_bfd, info, input_bfd, input_section,
   struct elf_link_hash_entry **sym_hashes;
   Elf_Internal_Rela *rel, *relend;
 
-  if (info->relocateable)
+  if (info->relocatable)
     return TRUE;
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
@@ -579,6 +579,12 @@ elf32_h8_mach (flags)
 
     case E_H8_MACH_H8300SN:
       return bfd_mach_h8300sn;
+
+    case E_H8_MACH_H8300SX:
+      return bfd_mach_h8300sx;
+
+    case E_H8_MACH_H8300SXN:
+      return bfd_mach_h8300sxn;
     }
 }
 
@@ -615,6 +621,14 @@ elf32_h8_final_write_processing (abfd, linker)
     case bfd_mach_h8300sn:
       val = E_H8_MACH_H8300SN;
       break;
+
+    case bfd_mach_h8300sx:
+      val = E_H8_MACH_H8300SX;
+      break;
+
+    case bfd_mach_h8300sxn:
+      val = E_H8_MACH_H8300SXN;
+      break;
     }
 
   elf_elfheader (abfd)->e_flags &= ~ (EF_H8_MACH);
@@ -692,10 +706,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
   /* Assume nothing changes.  */
   *again = FALSE;
 
-  /* We don't have to do anything for a relocateable link, if
+  /* We don't have to do anything for a relocatable link, if
      this section does not have relocs, or if this is not a
      code section.  */
-  if (link_info->relocateable
+  if (link_info->relocatable
       || (sec->flags & SEC_RELOC) == 0
       || sec->reloc_count == 0
       || (sec->flags & SEC_CODE) == 0)
@@ -1023,7 +1037,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
                 && value >= 0xff00
                 && value <= 0xffff)
                || ((bfd_get_mach (abfd) == bfd_mach_h8300h
-                    || bfd_get_mach (abfd) == bfd_mach_h8300s)
+                    /* FIXME: h8300hn? */
+                    || bfd_get_mach (abfd) == bfd_mach_h8300s
+                    /* FIXME: h8300sn? */
+                    || bfd_get_mach (abfd) == bfd_mach_h8300sx)
                    && value >= 0xffff00
                    && value <= 0xffffff))
              {
@@ -1081,7 +1098,10 @@ elf32_h8_relax_section (abfd, sec, link_info, again)
                 && value >= 0xff00
                 && value <= 0xffff)
                || ((bfd_get_mach (abfd) == bfd_mach_h8300h
-                    || bfd_get_mach (abfd) == bfd_mach_h8300s)
+                    /* FIXME: h8300hn? */
+                    || bfd_get_mach (abfd) == bfd_mach_h8300s
+                    /* FIXME: h8300sn? */
+                    || bfd_get_mach (abfd) == bfd_mach_h8300sx)
                    && value >= 0xffff00
                    && value <= 0xffffff))
              {
@@ -1358,12 +1378,12 @@ elf32_h8_symbol_address_p (abfd, sec, addr)
 
 static bfd_byte *
 elf32_h8_get_relocated_section_contents (output_bfd, link_info, link_order,
-                                        data, relocateable, symbols)
+                                        data, relocatable, symbols)
      bfd *output_bfd;
      struct bfd_link_info *link_info;
      struct bfd_link_order *link_order;
      bfd_byte *data;
-     bfd_boolean relocateable;
+     bfd_boolean relocatable;
      asymbol **symbols;
 {
   Elf_Internal_Shdr *symtab_hdr;
@@ -1375,11 +1395,11 @@ elf32_h8_get_relocated_section_contents (output_bfd, link_info, link_order,
 
   /* We only need to handle the case of relaxing, or of having a
      particular set of section contents, specially.  */
-  if (relocateable
+  if (relocatable
       || elf_section_data (input_section)->this_hdr.contents == NULL)
     return bfd_generic_get_relocated_section_contents (output_bfd, link_info,
                                                       link_order, data,
-                                                      relocateable,
+                                                      relocatable,
                                                       symbols);
 
   symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;