]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
aarch64: fix errno address calculation in SYSCALL_ERROR_HANDLER
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 8 Feb 2017 18:30:43 +0000 (16:30 -0200)
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>
Wed, 8 Feb 2017 18:30:43 +0000 (16:30 -0200)
This patch fixes the last regression in LTP lite scenario (mmap16) comparing
to lp64 in my source trees [1, 2]. The fix has been suggested back in 2015 [3]
but was never applied.

Checked on aarch64-linux-gnu.

* sysdeps/unix/sysv/linux/aarch64/sysdep.h: use PTR_REG() for offset
calculation in SYSCALL_ERROR_HANDLER().

[1] https://github.com/norov/glibc/tree/dev9
[2] https://github.com/norov/linux/tree/ilp32-20170203
[3] https://sourceware.org/ml/libc-alpha/2015-03/msg00587.html

ChangeLog
sysdeps/unix/sysv/linux/aarch64/sysdep.h

index 951daa7da0cae817e1f4d74ade0196142a543c2e..e2fe0d752da60c758e1bc4983a7cd63cae80ec1b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-08  Yury Norov  <ynorov@caviumnetworks.com>
+
+       * sysdeps/unix/sysv/linux/aarch64/sysdep.h: use PTR_REG() for offset
+       calculation in SYSCALL_ERROR_HANDLER().
+
 2017-02-08  Rical Jasan  <ricaljasan@pacific.net>
 
        * manual/contrib.texi: Fix typo.
index ad49241620f859f1622fa2c173659c7fd237c8ef..f301638a818811565a7abff017d265d4ec6ed1ae 100644 (file)
 .Lsyscall_error:                                               \
        adrp    x1, :gottprel:errno;                            \
        neg     w2, w0;                                         \
-       ldr     x1, [x1, :gottprel_lo12:errno];                 \
+       ldr     PTR_REG(1), [x1, :gottprel_lo12:errno];         \
        mrs     x3, tpidr_el0;                                  \
        mov     x0, -1;                                         \
        str     w2, [x1, x3];                                   \