aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/sparc
diff options
context:
space:
mode:
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>2017-05-02 16:55:48 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-05-02 16:57:31 -0300
commitb3d9c9a20c7e5cbee15b14990c4972d9df86dac7 (patch)
tree3e101f28a0b9ed890fe6d21357fbef660c4ad2ee /sysdeps/sparc
parent827b82378366b026413c8e80a78ba880b9f94a18 (diff)
downloadglibc-b3d9c9a20c7e5cbee15b14990c4972d9df86dac7.tar
glibc-b3d9c9a20c7e5cbee15b14990c4972d9df86dac7.tar.gz
glibc-b3d9c9a20c7e5cbee15b14990c4972d9df86dac7.tar.bz2
glibc-b3d9c9a20c7e5cbee15b14990c4972d9df86dac7.zip
sparc: handle R_SPARC_DISP64 and R_SPARC_REGISTER relocs
The Studio compiler generates relocation types which are not supported in glibc. Handle these relocs. Tested in sparc64-linux-gnu. No regressions. BZ #21179] * sysdeps/sparc/sparc64/dl-machine.h: Handle R_SPARC_DISP64 and R_SPARC_REGISTER relocations.
Diffstat (limited to 'sysdeps/sparc')
-rw-r--r--sysdeps/sparc/sparc64/dl-machine.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sysdeps/sparc/sparc64/dl-machine.h b/sysdeps/sparc/sparc64/dl-machine.h
index 99c00f493d..1b59d78a25 100644
--- a/sysdeps/sparc/sparc64/dl-machine.h
+++ b/sysdeps/sparc/sparc64/dl-machine.h
@@ -537,6 +537,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
case R_SPARC_DISP32:
*(unsigned int *) reloc_addr = (value - (Elf64_Addr) reloc_addr);
break;
+ case R_SPARC_DISP64:
+ *reloc_addr = (value - (Elf64_Addr) reloc_addr);
+ break;
+ case R_SPARC_REGISTER:
+ *reloc_addr = value;
+ break;
case R_SPARC_WDISP30:
*(unsigned int *) reloc_addr =
((*(unsigned int *)reloc_addr & 0xc0000000) |