diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2005-02-11 22:29:10 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2005-02-11 22:29:10 +0000 |
commit | 3d9fd4d890e785124e801af8e162596b35ef2733 (patch) | |
tree | 64a04162cc69cca6306c1fcb7287d1b659cca14e /bfd/elf64-mips.c | |
parent | 6f0bec73c48e0be3b03850d3af1631b6b30322e1 (diff) | |
download | gdb-3d9fd4d890e785124e801af8e162596b35ef2733.tar.gz |
* elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
R_MIPS_LITERAL relocations for external symbols.
* elf64-mips.c (mips_elf64_literal_reloc): Likewise.
* elfn32-mips.c (mips_elf_literal_reloc): Likewise.
Diffstat (limited to 'bfd/elf64-mips.c')
-rw-r--r-- | bfd/elf64-mips.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bfd/elf64-mips.c b/bfd/elf64-mips.c index 74ec7cbc478..b36743562fa 100644 --- a/bfd/elf64-mips.c +++ b/bfd/elf64-mips.c @@ -1543,14 +1543,14 @@ mips_elf64_literal_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol, bfd_reloc_status_type ret; bfd_vma gp; - /* If we're relocating, and this is an external symbol, we don't - want to change anything. */ + /* R_MIPS_LITERAL relocations are defined for local symbols only. */ 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; + *error_message = (char *) + _("literal relocation occurs for an external symbol"); + return bfd_reloc_outofrange; } /* FIXME: The entries in the .lit8 and .lit4 sections should be merged. */ |