* elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
[deliverable/binutils-gdb.git] / bfd / elf64-mips.c
index 404504ae3d609c15a7f11f768462a5d2dcc5d705..39f21b3046dd7d49eaad25b29ea3fcb963dc9d24 100644 (file)
@@ -306,11 +306,9 @@ static reloc_howto_type mips_elf64_howto_table_rel[] =
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
 
-  /* 16 bit PC relative reference.  Note that the ABI document has a typo
-     and claims R_MIPS_PC16 to be not rightshifted, rendering it useless.
-     We do the right thing here.  */
+  /* 16 bit PC relative reference.  */
   HOWTO (R_MIPS_PC16,          /* type */
-        2,                     /* rightshift */
+        0,                     /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         16,                    /* bitsize */
         TRUE,                  /* pc_relative */
@@ -803,11 +801,9 @@ static reloc_howto_type mips_elf64_howto_table_rela[] =
         0x0000ffff,            /* dst_mask */
         FALSE),                /* pcrel_offset */
 
-  /* 16 bit PC relative reference.  Note that the ABI document has a typo
-     and claims R_MIPS_PC16 to be not rightshifted, rendering it useless.
-     We do the right thing here.  */
+  /* 16 bit PC relative reference.  */
   HOWTO (R_MIPS_PC16,          /* type */
-        2,                     /* rightshift */
+        0,                     /* rightshift */
         2,                     /* size (0 = byte, 1 = short, 2 = long) */
         16,                    /* bitsize */
         TRUE,                  /* pc_relative */
@@ -1904,7 +1900,7 @@ static const struct elf_reloc_map mips_reloc_map[] =
   /* There is no BFD reloc for R_MIPS_REL32.  */
   { BFD_RELOC_64, R_MIPS_64 },
   { BFD_RELOC_CTOR, R_MIPS_64 },
-  { BFD_RELOC_16_PCREL_S2, R_MIPS_PC16 },
+  { BFD_RELOC_16_PCREL, R_MIPS_PC16 },
   { BFD_RELOC_HI16_S, R_MIPS_HI16 },
   { BFD_RELOC_LO16, R_MIPS_LO16 },
   { BFD_RELOC_GPREL16, R_MIPS_GPREL16 },
@@ -2891,6 +2887,7 @@ const struct elf_size_info mips_elf64_size_info =
 #define bfd_elf64_canonicalize_reloc mips_elf64_canonicalize_reloc
 #define bfd_elf64_get_dynamic_reloc_upper_bound mips_elf64_get_dynamic_reloc_upper_bound
 #define bfd_elf64_canonicalize_dynamic_reloc mips_elf64_canonicalize_dynamic_reloc
+#define bfd_elf64_bfd_relax_section     _bfd_mips_relax_section
 
 /* MIPS ELF64 archive functions.  */
 #define bfd_elf64_archive_functions
This page took 0.023287 seconds and 4 git commands to generate.