diff options
author | Roland McGrath <roland@hack.frob.com> | 2014-10-22 14:20:35 -0700 |
---|---|---|
committer | Roland McGrath <roland@hack.frob.com> | 2014-10-22 14:20:35 -0700 |
commit | 8c2b1ed8bbd20d35314c2a602b903159fa567ffb (patch) | |
tree | 4a9e06786fdb32c5558cdae218af3b4ff0b78af6 /sysdeps/arm/configure | |
parent | b5af9297d51a43f96c5be1bafab032184690dd6f (diff) | |
download | glibc-8c2b1ed8bbd20d35314c2a602b903159fa567ffb.tar.gz glibc-8c2b1ed8bbd20d35314c2a602b903159fa567ffb.tar.xz glibc-8c2b1ed8bbd20d35314c2a602b903159fa567ffb.zip |
ARM: Use movw/movt more when available
Diffstat (limited to 'sysdeps/arm/configure')
-rw-r--r-- | sysdeps/arm/configure | 52 |
1 files changed, 50 insertions, 2 deletions
diff --git a/sysdeps/arm/configure b/sysdeps/arm/configure index 238b335f7d..45667cc522 100644 --- a/sysdeps/arm/configure +++ b/sysdeps/arm/configure @@ -150,8 +150,8 @@ else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __ARM_PCS_VFP - yes - #endif + yes + #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -211,6 +211,54 @@ else have-arm-tls-desc = no" fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether PC-relative relocs in movw/movt work properly" >&5 +$as_echo_n "checking whether PC-relative relocs in movw/movt work properly... " >&6; } +if ${libc_cv_arm_pcrel_movw+:} false; then : + $as_echo_n "(cached) " >&6 +else + +cat > conftest.s <<\EOF + .syntax unified + .arm + .arch armv7-a + + .text + .globl foo + .type foo,%function +foo: movw r0, #:lower16:symbol - 1f - 8 + movt r0, #:upper16:symbol - 1f - 8 +1: add r0, pc + @ And now a case with a local symbol. + movw r0, #:lower16:3f - 2f - 8 + movt r0, #:upper16:3f - 2f - 8 +2: add r0, pc + bx lr + +.data + .globl symbol + .hidden symbol +symbol: .long 23 +3: .long 17 +EOF +libc_cv_arm_pcrel_movw=no +${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ + -nostartfiles -nostdlib -shared \ + -o conftest.so conftest.s 1>&5 2>&5 && +LC_ALL=C $READELF -dr conftest.so > conftest.dr 2>&5 && +{ + cat conftest.dr 1>&5 + fgrep 'TEXTREL +R_ARM_NONE' conftest.dr > /dev/null || libc_cv_arm_pcrel_movw=yes +} +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_arm_pcrel_movw" >&5 +$as_echo "$libc_cv_arm_pcrel_movw" >&6; } +if test $libc_cv_arm_pcrel_movw = yes; then + $as_echo "#define ARM_PCREL_MOVW_OK 1" >>confdefs.h + +fi + libc_cv_gcc_unwind_find_fde=no # Remove -fno-unwind-tables that was added in sysdeps/arm/preconfigure.ac. |