From 9a7e10917d5b1e3cf2cae864b336c1a4d1deb3c0 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 5 Oct 2011 11:53:16 +0200 Subject: [PATCH] mips: don't call ifunc functions in trace mode --- ChangeLog.mips | 11 ++++++++--- sysdeps/mips/dl-machine.h | 13 +++++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/ChangeLog.mips b/ChangeLog.mips index 8da2af2..5d9d772 100644 --- a/ChangeLog.mips +++ b/ChangeLog.mips @@ -1,3 +1,8 @@ +2011-10-05 Andreas Schwab + + * sysdeps/mips/dl-machine.h (elf_machine_rel, elf_machine_rela) + (elf_machine_lazy_rel): Add parameter skip_ifunc. + 2011-09-13 Joseph Myers * sysdeps/unix/sysv/linux/mips/bits/socket.h (__cmsg_nxthdr): Cast @@ -389,7 +394,7 @@ Update comment. * sysdeps/unix/sysv/linux/mips/kernel_rt_sigframe.h: New file. * sysdeps/unix/sysv/linux/mips/ucontext_i.sym: New file. - * sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers): + * sysdeps/unix/sysv/linux/mips/Makefile (gen-as-const-headers): Add ucontext_i.sym. 2009-04-18 Joseph Myers @@ -594,7 +599,7 @@ 2008-04-02 Aurelien Jarno - * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add + * sysdeps/unix/sysv/linux/mips/mips64/n32/syscalls.list: Add truncate and ftruncate systems calls. * sysdeps/unix/sysv/linux/mips/mips64/n32/ftruncate64.c: Make an empty file. @@ -980,7 +985,7 @@ (lll_robust_mutex_dead, lll_robust_mutex_trylock, lll_robust_mutex_lock, lll_robust_mutex_cond_lock, lll_robust_mutex_timedlock, lll_robust_mutex_unlock): New macros. - (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. + (__lll_robust_lock_wait, __lll_robust_timedlock_wait): New prototypes. * sysdeps/unix/sysv/linux/mips/nptl/pt-vfork.S: Use correct path to vfork.S. * sysdeps/unix/sysv/linux/mips/nptl/vfork.S: Likewise. diff --git a/sysdeps/mips/dl-machine.h b/sysdeps/mips/dl-machine.h index 26e1fcb..3e1d402 100644 --- a/sysdeps/mips/dl-machine.h +++ b/sysdeps/mips/dl-machine.h @@ -528,7 +528,7 @@ elf_machine_reloc (struct link_map *map, ElfW(Addr) r_info, strtab + refsym->st_name); } memcpy (reloc_addr, (void *) value, - MIN (sym->st_size, refsym->st_size)); + MIN (sym->st_size, refsym->st_size)); break; } @@ -559,7 +559,7 @@ auto inline void __attribute__ ((always_inline)) elf_machine_rel (struct link_map *map, const ElfW(Rel) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, - void *const reloc_addr) + void *const reloc_addr, int skip_ifunc) { elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr, 0, 1); } @@ -575,7 +575,8 @@ elf_machine_rel_relative (ElfW(Addr) l_addr, const ElfW(Rel) *reloc, auto inline void __attribute__((always_inline)) elf_machine_lazy_rel (struct link_map *map, - ElfW(Addr) l_addr, const ElfW(Rel) *reloc) + ElfW(Addr) l_addr, const ElfW(Rel) *reloc, + int skip_ifunc) { ElfW(Addr) *const reloc_addr = (void *) (l_addr + reloc->r_offset); const unsigned int r_type = ELFW(R_TYPE) (reloc->r_info); @@ -598,7 +599,7 @@ auto inline void __attribute__ ((always_inline)) elf_machine_rela (struct link_map *map, const ElfW(Rela) *reloc, const ElfW(Sym) *sym, const struct r_found_version *version, - void *const reloc_addr) + void *const reloc_addr, int skip_ifunc) { elf_machine_reloc (map, reloc->r_info, sym, version, reloc_addr, reloc->r_addend, 0); @@ -626,7 +627,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) ({ \ const ElfW(Sym) *ref = sym; \ const struct r_found_version *version \ - = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ + = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ struct link_map *sym_map; \ sym_map = RESOLVE_MAP (&ref, version, reloc); \ ref ? sym_map->l_addr + ref->st_value : 0; \ @@ -648,7 +649,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) i = (got[1] & ELF_MIPS_GNU_GOT1_MASK)? 2 : 1; /* Add the run-time displacement to all local got entries if - needed. */ + needed. */ if (__builtin_expect (map->l_addr != 0, 0)) { while (i < n) -- 2.7.4