aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf64-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
commitb88a866a5a41e0916a9f69db9db76b0a531e676e (patch)
treedf13c2bd74856e37326a57427bc8da3c38b71c2e /bfd/elf64-sparc.c
parent5f279fa6a900974303ecf24bca7f392fcdf76924 (diff)
downloadgdb-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/elf64-sparc.c')
-rw-r--r--bfd/elf64-sparc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/bfd/elf64-sparc.c b/bfd/elf64-sparc.c
index 3305f99..78d2a56 100644
--- a/bfd/elf64-sparc.c
+++ b/bfd/elf64-sparc.c
@@ -2053,11 +2053,11 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_DISP8:
case R_SPARC_DISP16:
case R_SPARC_DISP32:
+ case R_SPARC_DISP64:
case R_SPARC_WDISP30:
case R_SPARC_WDISP22:
case R_SPARC_WDISP19:
case R_SPARC_WDISP16:
- case R_SPARC_DISP64:
if (h == NULL)
break;
/* Fall through. */
@@ -2146,6 +2146,18 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_UA64:
if (!(outrel.r_offset & 7)) r_type = R_SPARC_64;
break;
+ case R_SPARC_DISP8:
+ case R_SPARC_DISP16:
+ case R_SPARC_DISP32:
+ case R_SPARC_DISP64:
+ /* 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)