diff options
Diffstat (limited to 'sysdeps/x86_64/dl-machine.h')
-rw-r--r-- | sysdeps/x86_64/dl-machine.h | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/sysdeps/x86_64/dl-machine.h b/sysdeps/x86_64/dl-machine.h index d2654aa04b..504c95f320 100644 --- a/sysdeps/x86_64/dl-machine.h +++ b/sysdeps/x86_64/dl-machine.h @@ -1,5 +1,5 @@ /* Machine-dependent ELF dynamic relocation inline functions. x86-64 version. - Copyright (C) 2001-2012 Free Software Foundation, Inc. + Copyright (C) 2001-2014 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Andreas Jaeger <aj@suse.de>. @@ -286,6 +286,21 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, switch (r_type) { +# ifndef RTLD_BOOTSTRAP +# ifdef __ILP32__ + case R_X86_64_SIZE64: + /* Set to symbol size plus addend. */ + *(Elf64_Addr *) (uintptr_t) reloc_addr + = (Elf64_Addr) sym->st_size + reloc->r_addend; + break; + + case R_X86_64_SIZE32: +# else + case R_X86_64_SIZE64: +# endif + /* Set to symbol size plus addend. */ + value = sym->st_size; +# endif case R_X86_64_GLOB_DAT: case R_X86_64_JUMP_SLOT: *reloc_addr = value + reloc->r_addend; @@ -394,6 +409,11 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, relocation updates the whole 64-bit entry. */ *(Elf64_Addr *) reloc_addr = (Elf64_Addr) value + reloc->r_addend; break; +# ifndef __ILP32__ + case R_X86_64_SIZE32: + /* Set to symbol size plus addend. */ + value = sym->st_size; +# endif case R_X86_64_32: value += reloc->r_addend; *(unsigned int *) reloc_addr = value; @@ -410,9 +430,7 @@ elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, # endif strtab = (const char *) D_PTR (map, l_info[DT_STRTAB]); - _dl_error_printf (fmt, - rtld_progname ?: "<program name unknown>", - strtab + refsym->st_name); + _dl_error_printf (fmt, RTLD_PROGNAME, strtab + refsym->st_name); } break; # ifndef RESOLVE_CONFLICT_FIND_MAP |