Bug 15905

Summary: [ARM] IFUNC support broken for REL relocs.
Product: glibc Reporter: Carlos O'Donell <carlos>
Component: libcAssignee: Carlos O'Donell <carlos>
Status: RESOLVED FIXED    
Severity: normal CC: drepper.fsp
Priority: P2 Flags: fweimer: security-
Version: 2.18   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Carlos O'Donell 2013-08-29 03:46:47 UTC
On ARM in dl-machine.h (elf_machine_rel) when handling R_ARM_IRELATIVE relocations for STT_GNU_IFUNC we fail to pass dl_hwcap to the IFUNC resolver resulting in the wrong function being selected for the current hardware.

When building glibc with multi-arch support and the VFP ABI this will cause the NEON variants of functions to be selected even though NEON hardware might not be present.

On hardware without NEON support the built glibc will fail to run correctly. This is immediately obvious as most of the testsuite will fail with SIGILL on this hardware.
Comment 1 Carlos O'Donell 2013-08-29 04:02:56 UTC
Posted patch:
http://sourceware.org/ml/libc-ports/2013-08/msg00053.html
Comment 2 Carlos O'Donell 2013-08-29 04:24:29 UTC
commit d0721e703d222c01a9e8c329311c4fb01dac6972
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Thu Aug 29 00:17:33 2013 -0400

    ARM: Pass dl_hwcap to IFUNC resolver.
    
    For REL relocs pass dl_hwcap to the IFUNC resolver
    as is required by the IFUNC API (bug 15905).