mirror of git://sourceware.org/git/glibc.git
ppc: Pass hwcap to ifuncs.
* sysdeps/powerpc/powerpc32/dl-irel.h (elf_ifunc_invoke): Pass dl_hwcap to ifunc resolver. * sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Use elf_ifunc_invoke. * sysdeps/powerpc/powerpc64/dl-irel.h (elf_ifunc_invoke): Pass dl_hwcap to ifunc resolver. * sysdeps/powerpc/powerpc64/dl-machine.h (resolve_ifunc): Likewise.
This commit is contained in:
parent
db5013c654
commit
a386f1cc22
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2012-05-25 Richard Henderson <rth@twiddle.net>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/powerpc32/dl-irel.h (elf_ifunc_invoke): Pass
|
||||||
|
dl_hwcap to ifunc resolver.
|
||||||
|
* sysdeps/powerpc/powerpc32/dl-machine.h (elf_machine_rela): Use
|
||||||
|
elf_ifunc_invoke.
|
||||||
|
* sysdeps/powerpc/powerpc64/dl-irel.h (elf_ifunc_invoke): Pass
|
||||||
|
dl_hwcap to ifunc resolver.
|
||||||
|
* sysdeps/powerpc/powerpc64/dl-machine.h (resolve_ifunc): Likewise.
|
||||||
|
|
||||||
2012-05-24 Joseph Myers <joseph@codesourcery.com>
|
2012-05-24 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
[BZ #14153]
|
[BZ #14153]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Machine-dependent ELF indirect relocation inline functions.
|
/* Machine-dependent ELF indirect relocation inline functions.
|
||||||
PowerPC version.
|
PowerPC version.
|
||||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -29,7 +29,7 @@ static inline Elf32_Addr
|
||||||
__attribute ((always_inline))
|
__attribute ((always_inline))
|
||||||
elf_ifunc_invoke (Elf32_Addr addr)
|
elf_ifunc_invoke (Elf32_Addr addr)
|
||||||
{
|
{
|
||||||
return ((Elf32_Addr (*) (void)) (addr)) ();
|
return ((Elf32_Addr (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* Machine-dependent ELF dynamic relocation inline functions. PowerPC version.
|
/* Machine-dependent ELF dynamic relocation inline functions. PowerPC version.
|
||||||
Copyright (C) 1995-2003, 2005, 2006, 2011 Free Software Foundation, Inc.
|
Copyright (C) 1995-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <dl-tls.h>
|
#include <dl-tls.h>
|
||||||
|
#include <dl-irel.h>
|
||||||
|
|
||||||
/* Translate a processor specific dynamic tag to the index
|
/* Translate a processor specific dynamic tag to the index
|
||||||
in l_info array. */
|
in l_info array. */
|
||||||
|
@ -308,7 +309,7 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||||
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
&& __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
||||||
&& __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
&& __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
||||||
&& __builtin_expect (!skip_ifunc, 1))
|
&& __builtin_expect (!skip_ifunc, 1))
|
||||||
value = ((Elf32_Addr (*) (void)) value) ();
|
value = elf_ifunc_invoke (value);
|
||||||
|
|
||||||
/* A small amount of code is duplicated here for speed. In libc,
|
/* A small amount of code is duplicated here for speed. In libc,
|
||||||
more than 90% of the relocs are R_PPC_RELATIVE; in the X11 shared
|
more than 90% of the relocs are R_PPC_RELATIVE; in the X11 shared
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* Machine-dependent ELF indirect relocation inline functions.
|
/* Machine-dependent ELF indirect relocation inline functions.
|
||||||
PowerPC64 version.
|
PowerPC64 version.
|
||||||
Copyright (C) 2009, 2011 Free Software Foundation, Inc.
|
Copyright (C) 2009-2012 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
@ -31,7 +31,7 @@ static inline Elf64_Addr
|
||||||
__attribute ((always_inline))
|
__attribute ((always_inline))
|
||||||
elf_ifunc_invoke (Elf64_Addr addr)
|
elf_ifunc_invoke (Elf64_Addr addr)
|
||||||
{
|
{
|
||||||
return ((Elf64_Addr (*) (void)) (addr)) ();
|
return ((Elf64_Addr (*) (unsigned long int)) (addr)) (GLRO(dl_hwcap));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|
|
@ -545,7 +545,7 @@ resolve_ifunc (Elf64_Addr value,
|
||||||
value = (Elf64_Addr) &opd;
|
value = (Elf64_Addr) &opd;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return ((Elf64_Addr (*) (void)) value) ();
|
return ((Elf64_Addr (*) (unsigned long int)) value) (GLRO(dl_hwcap));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Perform the relocation specified by RELOC and SYM (which is fully
|
/* Perform the relocation specified by RELOC and SYM (which is fully
|
||||||
|
|
Loading…
Reference in New Issue