diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2002-06-05 06:50:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2002-06-05 06:50:16 +0000 |
commit | d4df96e6ca31377d190eed7312b61e072f90a24a (patch) | |
tree | 93246b86c4d73d29ab97db3e8aabde21c1608d86 /bfd/elfxx-mips.c | |
parent | 3cac74d016404e4c8d425af463062b1e2534ec53 (diff) | |
download | gdb-d4df96e6ca31377d190eed7312b61e072f90a24a.zip gdb-d4df96e6ca31377d190eed7312b61e072f90a24a.tar.gz gdb-d4df96e6ca31377d190eed7312b61e072f90a24a.tar.bz2 |
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.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r-- | bfd/elfxx-mips.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index 67179ee..08e1abb 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -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) |