public inbox for
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <>
To: "" <>,
	       "Joseph S. Myers" <>
Cc: Kyle McMartin <>
Subject: [PATCH] arm: Fix R_ARM_IRELATIVE for REL relocs.
Date: Wed, 28 Aug 2013 04:23:00 -0000	[thread overview]
Message-ID: <> (raw)


While running glibc on 32-bit ARM hardware with multiarch enabled,
VFP ABI, but no NEON, almost the entire testsuite fails with

Debugging shows glibc trying to execute the NEON optimized 
routines although no NEON is present and the kernel has indicated
that via the HWCAP.

This is because ARM's dl-machine.h fails to pass dl_hwcap to the
IFUNC resolver function for REL relocs in elf_machine_rel.

The RELA case was fixed by Will Newton here:

Verified by building on ARM with no regressions.

OK to checkin?


2013-08-28  Kyle McMartin  <>
	    Carlos O'Donell  <>

	* sysdeps/arm/dl-machine [!RTLD_BOOTSTRAP] (elf_machine_rel):
	Pass GLRO(dl_hwcap) to the IFUNC resolver.

diff --git a/ports/sysdeps/arm/dl-machine.h b/ports/sysdeps/arm/dl-machine.h
index d251527..85dba67 100644
--- a/ports/sysdeps/arm/dl-machine.h
+++ b/ports/sysdeps/arm/dl-machine.h
@@ -503,7 +503,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
        case R_ARM_IRELATIVE:
          value = map->l_addr + *reloc_addr;
-         value = ((Elf32_Addr (*) (void)) value) ();
+         value = ((Elf32_Addr (*) (int)) value) (GLRO(dl_hwcap));
          *reloc_addr = value;


             reply	other threads:[~2013-08-28  4:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-28  4:23 Carlos O'Donell [this message]
2013-08-28 16:14 ` Joseph S. Myers
2013-08-29  4:17   ` Carlos O'Donell
2013-08-29 10:00     ` Will Newton
2013-08-29 12:25       ` Joseph S. Myers
2013-08-29 19:18         ` Will Newton
2013-08-29 12:24     ` Joseph S. Myers
2013-08-29 19:27     ` Joseph S. Myers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).