[gnutls-devel] GnuTLS | Error: ARM register expected -- `ldr x16, .L_gnutls_arm_cpuid_s'in sha1-armv8 (#1089)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sat Sep 12 22:37:38 CEST 2020



Sab24 created an issue: https://gitlab.com/gnutls/gnutls/-/issues/1089



## Description of problem:
Cross compilation fails for specific arm assembly instructions in sha1-armv8

## Version of gnutls used:
HEAD

## Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)
Archlinux, building from source, cross-compiling for armv7

## How reproducible:

```
git clone https://gitlab.com/gnutls/gnutls.git
cd gnutls
./bootstrap
./configure --host=armv8-rpi3-linux-gnueabihf --prefix=/home/buildbot/x-tools/armv8-rpi3-linux-gnueabihf/armv8-rpi3-linux-gnueabihf/sysroot/usr --with-included-unistring
make
```

## Actual results:
```
configure: summary of build options:

  version:              3.6.14 shared 58:0:28
  Host/Target system:   armv8-rpi3-linux-gnueabihf
  Build system:         x86_64-pc-linux-gnu
  Install prefix:       /home/bartsmink/x-tools/armv8-rpi3-linux-gnueabihf/armv8-rpi3-linux-gnueabihf/sysroot/usr
  Compiler:             armv8-rpi3-linux-gnueabihf-gcc
  Valgrind:             no
  CFlags:               -g -O2
  Library types:        Shared=yes, Static=no
  Local libopts:        no
  Local libtasn1:       no
  Local unistring:      yes
  Use nettle-mini:      no
  Documentation:        yes (manpages: yes)

configure: External hardware support:

  /dev/crypto:          no
  Hardware accel:       aarch64
  Padlock accel:        no
  Random gen. variant:  getrandom
  PKCS#11 support:      yes
  TPM support:          no

configure: Optional features:
(note that included applications might not compile properly
if features are disabled)

  SSL3.0 support:       no
  SSL2.0 client hello:  yes
  Allow SHA1 sign:      no
  DTLS-SRTP support:    yes
  ALPN support:         yes
  OCSP support:         yes
  SRP support:          yes
  PSK support:          yes
  DHE support:          yes
  ECDHE support:        yes
  GOST support:         yes
  Anon auth support:    yes
  Heartbeat support:    yes
  IDNA support:         IDNA 2008 (libidn2)
  Non-SuiteB curves:    yes
  FIPS140 mode:         no
  Strict DER time:      yes

configure: Optional libraries:

  Guile wrappers:       no
  C++ library:          yes
  DANE library:         no
  OpenSSL compat:       no

configure: System files:

  Trust store pkcs11:
  Trust store dir:
  Trust store file:
  Blacklist file:
  CRL file:
  Configuration file:   /etc/gnutls/config
  DNSSEC root key file: /etc/unbound/root.key

configure: WARNING:
***
*** The DNSSEC root key file in /etc/unbound/root.key was not found.
*** This file is needed for the verification of DNSSEC responses.
*** Use the command: unbound-anchor -a "/etc/unbound/root.key"
*** to generate or update it.
***
```

```
  CC       aes-ccm-aarch64.lo
  CCAS     elf/sha1-armv8.lo
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S: Assembler messages:
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:13: Error: ARM register expected -- `ldr x16,.L_gnutls_arm_cpuid_s'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:15: Error: ARM register expected -- `adr x17,.L_gnutls_arm_cpuid_s'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:16: Error: ARM register expected -- `add x16,x16,x17'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:17: Error: ARM register expected -- `ldr w16,[x16]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:18: Error: ARM register expected -- `tst w16,#(1<<3)'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:19: Error: unexpected character `n' in type specifier
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:19: Error: bad instruction `b.ne .Lv8_entry'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:21: Error: bad instruction `stp x29,x30,[sp,#-96]!'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:22: Error: ARM register expected -- `add x29,sp,#0'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:23: Error: bad instruction `stp x19,x20,[sp,#16]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:24: Error: bad instruction `stp x21,x22,[sp,#32]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:25: Error: bad instruction `stp x23,x24,[sp,#48]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:26: Error: bad instruction `stp x25,x26,[sp,#64]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:27: Error: bad instruction `stp x27,x28,[sp,#80]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:29: Error: bad instruction `ldp w20,w21,[x0]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:30: Error: bad instruction `ldp w22,w23,[x0,#8]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:31: Error: ARM register expected -- `ldr w24,[x0,#16]'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:34: Error: ARM register expected -- `ldr x3,[x1],#64'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:35: Error: bad instruction `movz w28,#0x7999'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:36: Error: ARM register expected -- `sub x2,x2,#1'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:37: Error: bad instruction `movk w28,#0x5a82,lsl#16'
lib/accelerated/aarch64/elf/sha1-armv8.s.tmp.S:41: Error: bad instruction `rev32 x3,x3'
```

## Expected results:

Compilation of the project

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/gnutls/-/issues/1089
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20200912/8bbef22f/attachment-0001.html>


More information about the Gnutls-devel mailing list