* elf64-mips.c (mips16_gprel_reloc): Update a comment.

* elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
relocations against external symbols unchanged.
This commit is contained in:
Maciej W. Rozycki 2005-02-10 03:07:46 +00:00
parent 4297f9f1cc
commit 7f05722e09
3 changed files with 18 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2005-02-10 Maciej W. Rozycki <macro@mips.com>
* elf64-mips.c (mips16_gprel_reloc): Update a comment.
* elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
relocations against external symbols unchanged.
2005-02-08 Paul Brook <paul@codesourcery.com>
* elflink.c (elf_link_input_bfd): Ignore symbols from null input

View File

@ -1709,8 +1709,8 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
bfd_signed_vma val;
bfd_vma relocation;
/* If we're relocating, and this is an external symbol with no
addend, we don't want to change anything. */
/* If we're relocating, and this is an external symbol, we don't want
to change anything. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
&& (symbol->flags & BSF_LOCAL) != 0)

View File

@ -1507,6 +1507,16 @@ mips16_gprel_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
bfd_signed_vma val;
bfd_vma relocation;
/* If we're relocating, and this is an external symbol, we don't want
to change anything. */
if (output_bfd != NULL
&& (symbol->flags & BSF_SECTION_SYM) == 0
&& (symbol->flags & BSF_LOCAL) != 0)
{
reloc_entry->address += input_section->output_offset;
return bfd_reloc_ok;
}
if (output_bfd != NULL)
relocatable = TRUE;
else