diff options
author | Maciej W. Rozycki <macro@linux-mips.org> | 2005-02-10 03:07:46 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@linux-mips.org> | 2005-02-10 03:07:46 +0000 |
commit | 7da5f8468de191f107950590a84e54b871e1155b (patch) | |
tree | a42d366a7d461ac2e1dae7fabc21b19b9cd9a0fe /bfd/elfn32-mips.c | |
parent | 25eb06a97f9fe5d635edd4e74ac93b61fb708658 (diff) | |
download | gdb-7da5f8468de191f107950590a84e54b871e1155b.tar.gz |
* elf64-mips.c (mips16_gprel_reloc): Update a comment.
* elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
relocations against external symbols unchanged.
Diffstat (limited to 'bfd/elfn32-mips.c')
-rw-r--r-- | bfd/elfn32-mips.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/bfd/elfn32-mips.c b/bfd/elfn32-mips.c index 48c2579bef0..d87c45c076d 100644 --- a/bfd/elfn32-mips.c +++ b/bfd/elfn32-mips.c @@ -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 |