SHA256
3
0
forked from pool/glibc
glibc/glibc-ports-2.15-ifunc-trace.patch
Andreas Jaeger aa6dfe41b1 Accepting request 90934 from openSUSE:Factory:ARM
- fix building with ports again:
  * ifuncs tracing backport requires adjustments
- avoid using asynchronous-unwind-tables only during configure,
  but still built the library with unwind tables enabled
- replace arm build hack with a proper solution
------------------------------------------------------------------
- armv8l architecture does not exist

OBS-URL: https://build.opensuse.org/request/show/90934
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=128
2011-11-10 14:05:53 +00:00

96 lines
3.6 KiB
Diff

commit 0507f293c9b67d8eec92e8178308d72f1ed88449
Author: Andreas Schwab <schwab@redhat.com>
Date: Wed Oct 5 11:51:41 2011 +0200
arm: don't call ifunc functions in trace mode
--- a/sysdeps/arm/dl-machine.h
+++ b/sysdeps/arm/dl-machine.h
@@ -335,7 +335,7 @@ auto inline void
__attribute__ ((always_inline))
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
- void *const reloc_addr_arg)
+ void *const reloc_addr_arg, int skip_ifunc)
{
Elf32_Addr *const reloc_addr = reloc_addr_arg;
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
@@ -369,9 +369,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
if (sym != NULL
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
- 0)
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
+ && __builtin_expect (!skip_ifunc, 1))
value = ((Elf32_Addr (*) (void)) value) ();
switch (r_type)
@@ -430,7 +430,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
}
case R_ARM_TLS_DESC:
{
- struct tlsdesc volatile *td =
+ struct tlsdesc volatile *td =
(struct tlsdesc volatile *)reloc_addr;
# ifndef RTLD_BOOTSTRAP
@@ -454,10 +454,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
else
# endif
# endif
- {
+ {
td->argument.value = value + sym_map->l_tls_offset;
td->entry = _dl_tlsdesc_return;
- }
+ }
}
}
break;
@@ -525,7 +525,7 @@ auto inline void
__attribute__ ((always_inline))
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
const Elf32_Sym *sym, const struct r_found_version *version,
- void *const reloc_addr_arg)
+ void *const reloc_addr_arg, int skip_ifunc)
{
Elf32_Addr *const reloc_addr = reloc_addr_arg;
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
@@ -543,9 +543,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
if (sym != NULL
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
- 0)
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
+ && __builtin_expect (!skip_ifunc, 1))
value = ((Elf32_Addr (*) (void)) value) ();
switch (r_type)
@@ -656,7 +656,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
auto inline void
__attribute__ ((always_inline))
elf_machine_lazy_rel (struct link_map *map,
- Elf32_Addr l_addr, const Elf32_Rel *reloc)
+ Elf32_Addr l_addr, const Elf32_Rel *reloc,
+ int skip_ifunc)
{
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
@@ -674,8 +675,8 @@ elf_machine_lazy_rel (struct link_map *map,
(struct tlsdesc volatile *)reloc_addr;
/* The linker must have given us the parameter we need in the
- first GOT entry, and left the second one empty. We fill the
- last with the resolver address */
+ first GOT entry, and left the second one empty. We fill the
+ last with the resolver address */
assert (td->entry == 0);
td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)])
+ map->l_addr);