summaryrefslogtreecommitdiff
path: root/bfd/elf32-sparc.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2002-04-03 17:42:39 +0000
committerJakub Jelinek <jakub@redhat.com>2002-04-03 17:42:39 +0000
commit1858edb362f6b665e7a1fbf3358c48d1bdece82e (patch)
tree40cecef4a3808f7701f6b32c4008f764727d2bde /bfd/elf32-sparc.c
parent1fb48c07fb920a5a77580aac7d89896b682123eb (diff)
downloadgdb-1858edb362f6b665e7a1fbf3358c48d1bdece82e.tar.gz
* elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
PC relative relocs against hidden symbols. * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
Diffstat (limited to 'bfd/elf32-sparc.c')
-rw-r--r--bfd/elf32-sparc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/bfd/elf32-sparc.c b/bfd/elf32-sparc.c
index fff9fa2edc2..a11db81c305 100644
--- a/bfd/elf32-sparc.c
+++ b/bfd/elf32-sparc.c
@@ -1467,6 +1467,17 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
if (!(outrel.r_offset & 3))
r_type = R_SPARC_32;
break;
+ case R_SPARC_DISP8:
+ case R_SPARC_DISP16:
+ case R_SPARC_DISP32:
+ /* If the symbol is not dynamic, we should not keep
+ a dynamic relocation. But an .rela.* slot has been
+ allocated for it, output R_SPARC_NONE.
+ FIXME: Add code tracking needed dynamic relocs as
+ e.g. i386 has. */
+ if (h->dynindx == -1)
+ skip = true, relocate = true;
+ break;
}
if (skip)