mirror of git://sourceware.org/git/glibc.git
Handle some new sparc relocation types.
* elf/elf.h (R_SPARC_WDISP10): Define. * sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle R_SPARC_SIZE32. * sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Handle R_SPARC_SIZE64 and R_SPARC_H34.
This commit is contained in:
parent
96154cd892
commit
5ed848f3d8
|
@ -1,3 +1,11 @@
|
|||
2012-04-07 David S. Miller <davem@davemloft.net>
|
||||
|
||||
* elf/elf.h (R_SPARC_WDISP10): Define.
|
||||
* sysdeps/sparc/sparc32/dl-machine.h (elf_machine_rela): Handle
|
||||
R_SPARC_SIZE32.
|
||||
* sysdeps/sparc/sparc64/dl-machine.h (elf_machine_rela): Handle
|
||||
R_SPARC_SIZE64 and R_SPARC_H34.
|
||||
|
||||
2012-04-07 Carlos O'Donell <carlos_odonell@mentor.com>
|
||||
|
||||
* elf/dynamic-link.h (_ELF_DYNAMIC_DO_RELOC): Simplify
|
||||
|
|
|
@ -1327,6 +1327,7 @@ typedef struct
|
|||
#define R_SPARC_H34 85
|
||||
#define R_SPARC_SIZE32 86
|
||||
#define R_SPARC_SIZE64 87
|
||||
#define R_SPARC_WDISP10 88
|
||||
#define R_SPARC_JMP_IREL 248
|
||||
#define R_SPARC_IRELATIVE 249
|
||||
#define R_SPARC_GNU_VTINHERIT 250
|
||||
|
|
|
@ -359,6 +359,12 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
|||
if (__builtin_expect (r_type == R_SPARC_NONE, 0))
|
||||
return;
|
||||
|
||||
if (__builtin_expect (r_type == R_SPARC_SIZE32, 0))
|
||||
{
|
||||
*reloc_addr = sym->st_size + reloc->r_addend;
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
||||
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
|
||||
{
|
||||
|
|
|
@ -385,6 +385,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
|||
if (__builtin_expect (r_type == R_SPARC_NONE, 0))
|
||||
return;
|
||||
|
||||
if (__builtin_expect (r_type == R_SPARC_SIZE64, 0))
|
||||
{
|
||||
*reloc_addr = sym->st_size + reloc->r_addend;
|
||||
return;
|
||||
}
|
||||
|
||||
#if !defined RTLD_BOOTSTRAP || !defined HAVE_Z_COMBRELOC
|
||||
if (__builtin_expect (r_type == R_SPARC_RELATIVE, 0))
|
||||
{
|
||||
|
@ -552,6 +558,12 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
|
|||
(((value & 0x3ff) + ELF64_R_TYPE_DATA (reloc->r_info)) & 0x1fff));
|
||||
break;
|
||||
|
||||
/* ABS34 code model reloc */
|
||||
case R_SPARC_H34:
|
||||
*(unsigned int *) reloc_addr =
|
||||
((*(unsigned int *)reloc_addr & 0xffc00000) |
|
||||
((value >> 12) & 0x3fffff));
|
||||
|
||||
/* MEDMID code model relocs */
|
||||
case R_SPARC_H44:
|
||||
*(unsigned int *) reloc_addr =
|
||||
|
|
Loading…
Reference in New Issue