aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2002-11-06 21:56:05 +0000
committerAlexandre Oliva <aoliva@redhat.com>2002-11-06 21:56:05 +0000
commit4917946930e5e20ae6a615fd32be5f50cab56418 (patch)
treea36c39c768b9cf60c17861958c778d59071e7ace
parentf8302a575394d045db014d182246a66e0e404d44 (diff)
downloadgdb-4917946930e5e20ae6a615fd32be5f50cab56418.zip
gdb-4917946930e5e20ae6a615fd32be5f50cab56418.tar.gz
gdb-4917946930e5e20ae6a615fd32be5f50cab56418.tar.bz2
* elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
exactly three internal relocs per external reloc. Set reloc_count to the external reloc count.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elf64-mips.c25
2 files changed, 8 insertions, 23 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 187c611..d905588 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2002-11-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
+ exactly three internal relocs per external reloc. Set reloc_count
+ to the external reloc count.
+
2002-11-06 Klee Dienes <kdienes@apple.com>
* coff-stgo32.c (stub_bytes): Mark as const.
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c
index bf98c91..f06d065 100644
--- a/bfd/elf64-mips.c
+++ b/bfd/elf64-mips.c
@@ -2073,7 +2073,7 @@ mips_elf64_slurp_one_reloc_table (abfd, asect, symbols, rel_hdr)
rela.r_addend = 0;
}
- /* Each entry represents up to three actual relocations. */
+ /* Each entry represents exactly three actual relocations. */
used_sym = false;
used_ssym = false;
@@ -2096,27 +2096,6 @@ mips_elf64_slurp_one_reloc_table (abfd, asect, symbols, rel_hdr)
break;
}
- if (type == R_MIPS_NONE)
- {
- /* There are no more relocations in this entry. If this
- is the first entry, we need to generate a dummy
- relocation so that the generic linker knows that
- there has been a break in the sequence of relocations
- applying to a particular address. */
- if (ir == 0)
- {
- relent->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
- if ((abfd->flags & (EXEC_P | DYNAMIC)) == 0)
- relent->address = rela.r_offset;
- else
- relent->address = rela.r_offset - asect->vma;
- relent->addend = 0;
- relent->howto = &howto_table[(int) R_MIPS_NONE];
- ++relent;
- }
- break;
- }
-
/* Some types require symbols, whereas some do not. */
switch (type)
{
@@ -2194,7 +2173,7 @@ mips_elf64_slurp_one_reloc_table (abfd, asect, symbols, rel_hdr)
}
}
- asect->reloc_count += relent - relents;
+ asect->reloc_count += (relent - relents) / 3;
if (allocated != NULL)
free (allocated);