sparc: elf: handle R_SPARC_DISP64 and R_SPARC_REGISTER relocs
Commit Message
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
The Studio compiler generates relocation types which are not supported
in glibc. Handle these relocs.
Tested in sparc64-linux-gnu. No regressions.
* sysdeps/sparc/sparc64/dl-machine.h: Handle R_SPARC_DISP64 and
R_SPARC_REGISTER relocations.
---
sysdeps/sparc/sparc64/dl-machine.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
Comments
From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
Date: Fri, 17 Feb 2017 09:26:42 -0800
> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>
> The Studio compiler generates relocation types which are not supported
> in glibc. Handle these relocs.
>
> Tested in sparc64-linux-gnu. No regressions.
>
> * sysdeps/sparc/sparc64/dl-machine.h: Handle R_SPARC_DISP64 and
> R_SPARC_REGISTER relocations.
This is fine.
On Fri, 17 Feb 2017, Vladimir Mezentsev wrote:
> From: Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
>
> The Studio compiler generates relocation types which are not supported
> in glibc. Handle these relocs.
>
> Tested in sparc64-linux-gnu. No regressions.
>
> * sysdeps/sparc/sparc64/dl-machine.h: Handle R_SPARC_DISP64 and
> R_SPARC_REGISTER relocations.
Since you filed bug 21179 for this, you need to include [BZ #21179] in the
ChangeLog entry.
@@ -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) |