* elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
authorStan Cox <scox@redhat.com>
Wed, 18 Sep 2002 01:38:20 +0000 (01:38 +0000)
committerStan Cox <scox@redhat.com>
Wed, 18 Sep 2002 01:38:20 +0000 (01:38 +0000)
(mips_elf64_final_gp): Don't make up gp value.
* elfn32-mips.c (mips_elf_final_gp): Likewise.
* elfxx-mips.c (_bfd_mips_elf_final_link): Always create
.MIPS.options/.options section.

bfd/ChangeLog
bfd/elf64-mips.c
bfd/elfn32-mips.c
bfd/elfxx-mips.c

index 4c0cbc7d2d7cf433bce2e7b3af53ab124d82f540..ce930f809b48f8078ec6b7609cf5345b526dc970 100644 (file)
@@ -1,3 +1,11 @@
+2002-09-17  Stan Cox <scox@redhat.com> 
+
+       * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
+       (mips_elf64_final_gp): Don't make up gp value.
+       * elfn32-mips.c (mips_elf_final_gp): Likewise.
+       * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
+       .MIPS.options/.options section.
+
 2002-09-17  David O'Brien  <obrien@FreeBSD.org>
 
        * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
index 95abaffdfc0fbf72c06c73611f6c1a11bd190b5c..cc7ec407235dbd448bc0c00344c8571aaf4b2593 100644 (file)
@@ -1337,13 +1337,15 @@ mips_elf64_be_swap_reloc_out (abfd, src, dst)
 
   mirel.r_offset = src[0].r_offset;
   BFD_ASSERT(src[0].r_offset == src[1].r_offset);
+#if 0  
   BFD_ASSERT(src[0].r_offset == src[2].r_offset);
+#endif
 
   mirel.r_type = ELF64_MIPS_R_TYPE (src[0].r_info);
   mirel.r_sym = ELF64_R_SYM (src[0].r_info);
-  mirel.r_type2 = ELF64_MIPS_R_TYPE2 (src[1].r_info);
+  mirel.r_type2 = ELF64_MIPS_R_TYPE (src[1].r_info);
   mirel.r_ssym = ELF64_MIPS_R_SSYM (src[1].r_info);
-  mirel.r_type3 = ELF64_MIPS_R_TYPE3 (src[2].r_info);
+  mirel.r_type3 = ELF64_MIPS_R_TYPE (src[2].r_info);
 
   mips_elf64_swap_reloc_out (abfd, &mirel,
                             (Elf64_Mips_External_Rel *) dst);
@@ -1525,7 +1527,7 @@ mips_elf64_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
       if (relocateable)
        {
          /* Make up a value.  */
-         *pgp = symbol->section->output_section->vma + 0x4000;
+         *pgp = symbol->section->output_section->vma /*+ 0x4000*/;
          _bfd_set_gp_value (output_bfd, *pgp);
        }
       else if (!mips_elf64_assign_gp (output_bfd, pgp))
index 040fddfef301c3929927b0bf7c48308606f4fc6c..916b16bd0ad39de813f0877e5f2c3e68179d65a1 100644 (file)
@@ -1505,7 +1505,7 @@ mips_elf_final_gp (output_bfd, symbol, relocateable, error_message, pgp)
       if (relocateable)
        {
          /* Make up a value.  */
-         *pgp = symbol->section->output_section->vma + 0x4000;
+         *pgp = symbol->section->output_section->vma /*+ 0x4000*/;
          _bfd_set_gp_value (output_bfd, *pgp);
        }
       else if (!mips_elf_assign_gp (output_bfd, pgp))
index 51326934ffd67b82c6d87d5b2738eca7b27eeb1b..8da904be7772ddea7514733e70d45f51b0bdb6a9 100644 (file)
@@ -6984,6 +6984,8 @@ _bfd_mips_elf_final_link (abfd, info)
                    <= g->global_gotno);
     }
 
+#if 0
+  /* We want to set the GP value for ld -r.  */
   /* On IRIX5, we omit the .options section.  On IRIX6, however, we
      include it, even though we don't process it quite right.  (Some
      entries are supposed to be merged.)  Empirically, we seem to be
@@ -7021,6 +7023,7 @@ _bfd_mips_elf_final_link (abfd, info)
          break;
        }
     }
+#endif
 
   /* Get a value for the GP register.  */
   if (elf_gp (abfd) == 0)
This page took 0.042811 seconds and 4 git commands to generate.