diff options
author | Jakub Jelinek <jakub@redhat.com> | 2002-04-03 17:42:39 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2002-04-03 17:42:39 +0000 |
commit | 1858edb362f6b665e7a1fbf3358c48d1bdece82e (patch) | |
tree | 40cecef4a3808f7701f6b32c4008f764727d2bde /bfd/elf32-sparc.c | |
parent | 1fb48c07fb920a5a77580aac7d89896b682123eb (diff) | |
download | gdb-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.c | 11 |
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) |