2002-06-05 H.J. Lu <hjl@gnu.org>
authorH.J. Lu <hjl.tools@gmail.com>
Wed, 5 Jun 2002 06:50:16 +0000 (06:50 +0000)
committerH.J. Lu <hjl.tools@gmail.com>
Wed, 5 Jun 2002 06:50:16 +0000 (06:50 +0000)
* elfxx-mips.c (mips_elf_calculate_relocation): Call
_bfd_elf_rel_local_sym for STT_SECTION relocations against
the SEC_MERGE section.

bfd/ChangeLog
bfd/elfxx-mips.c

index f37865dbe131e9425566bec77841bf4878c2206b..b0ca9d0c901142f2222fcf75bba895f420e7fcbb 100644 (file)
@@ -1,3 +1,9 @@
+2002-06-05  H.J. Lu <hjl@gnu.org>
+
+       * elfxx-mips.c (mips_elf_calculate_relocation): Call
+       _bfd_elf_rel_local_sym for STT_SECTION relocations against
+       the SEC_MERGE section.
+
 2002-06-05  Alan Modra  <amodra@bigpond.net.au>
 
        * coff-alpha.c: Update copyright date.
index 67179ee18d967d205eb4358979d09cc4d44d4753..08e1abbcd70455092935b715855031766ac8afba 100644 (file)
@@ -2082,8 +2082,16 @@ mips_elf_calculate_relocation (abfd, input_bfd, input_section, info,
       sec = local_sections[r_symndx];
 
       symbol = sec->output_section->vma + sec->output_offset;
-      if (ELF_ST_TYPE (sym->st_info) != STT_SECTION)
+      if (ELF_ST_TYPE (sym->st_info) != STT_SECTION
+         || (sec->flags & SEC_MERGE))
        symbol += sym->st_value;
+      if ((sec->flags & SEC_MERGE)
+         && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+       {
+         addend = _bfd_elf_rel_local_sym (abfd, sym, &sec, addend);
+         addend -= symbol;
+         addend += sec->output_section->vma + sec->output_offset;
+       }
 
       /* MIPS16 text labels should be treated as odd.  */
       if (sym->st_other == STO_MIPS16)
This page took 0.032884 seconds and 4 git commands to generate.