mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
* elf32-mips.c (mips_elf_gprel32_reloc): Reject
R_MIPS_GPREL32 relocations against external symbols. * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect comment.
This commit is contained in:
parent
74e5ef4498
commit
765f2ef695
@ -1,3 +1,10 @@
|
||||
2005-02-07 Maciej W. Rozycki <macro@mips.com>
|
||||
|
||||
* elf32-mips.c (mips_elf_gprel32_reloc): Reject
|
||||
R_MIPS_GPREL32 relocations against external symbols.
|
||||
* elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
|
||||
comment.
|
||||
|
||||
2005-02-07 Alan Modra <amodra@bigpond.net.au>
|
||||
|
||||
* elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
|
||||
|
@ -800,6 +800,16 @@ mips_elf_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
|
||||
bfd_reloc_status_type ret;
|
||||
bfd_vma gp;
|
||||
|
||||
/* R_MIPS_GPREL32 relocations are defined for local symbols only. */
|
||||
if (output_bfd != NULL
|
||||
&& (symbol->flags & BSF_SECTION_SYM) == 0
|
||||
&& (symbol->flags & BSF_LOCAL) != 0)
|
||||
{
|
||||
*error_message = (char *)
|
||||
_("32bits gp relative relocation occurs for an external symbol");
|
||||
return bfd_reloc_outofrange;
|
||||
}
|
||||
|
||||
if (output_bfd != NULL)
|
||||
relocatable = TRUE;
|
||||
else
|
||||
|
@ -1586,8 +1586,7 @@ mips_elf64_gprel32_reloc (bfd *abfd, arelent *reloc_entry, asymbol *symbol,
|
||||
bfd_vma relocation;
|
||||
bfd_vma val;
|
||||
|
||||
/* If we're relocating, and this is an external symbol, we don't want
|
||||
to change anything. */
|
||||
/* R_MIPS_GPREL32 relocations are defined for local symbols only. */
|
||||
if (output_bfd != NULL
|
||||
&& (symbol->flags & BSF_SECTION_SYM) == 0
|
||||
&& (symbol->flags & BSF_LOCAL) != 0)
|
||||
|
Loading…
Reference in New Issue
Block a user