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 | b88a866a5a41e0916a9f69db9db76b0a531e676e (patch) | |
tree | df13c2bd74856e37326a57427bc8da3c38b71c2e /bfd/elf32-sparc.c | |
parent | 5f279fa6a900974303ecf24bca7f392fcdf76924 (diff) | |
download | gdb-b88a866a5a41e0916a9f69db9db76b0a531e676e.zip gdb-b88a866a5a41e0916a9f69db9db76b0a531e676e.tar.gz gdb-b88a866a5a41e0916a9f69db9db76b0a531e676e.tar.bz2 |
* 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 fff9fa2..a11db81 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) |