You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cleanup of ARM assembler code in bignum.c (PR #5706) broke building for ARM Cortex A9, VFPv3
System information
Mbed TLS version (number or commit id): v1.3.1, commit >= 46435f0, PR #5706
Operating system and version: Linux (Kernel headers v3.0.13) / Cross-toolchain
Configuration (if not default, please attach mbedtls_config.h): default
Compiler and options (if you used a pre-built binary, please indicate how you obtained it):
Cross-toolchain: ARM Cortex-A9 / VFPv3 / soft-fp
GCC 11.2.0
mbedtls should compile the bignum-module successfully.
Actual behavior
Build fails, ARM opcode ldr.w ˋstr.wˋ is not understood by the compiler:
/tmp/cc9bU4kd.s:1714: Error: unexpected character `w' in type specifier
/tmp/cc9bU4kd.s:1714: Error: bad instruction `ldr.w r5,[r2],#+8'
Full output:
# make
make[1]: Entering directory '/tmp/mbedtls_bignum_issue/mbedtls/library'
CC aes.c
CC aesni.c
CC aria.c
CC asn1parse.c
CC asn1write.c
CC base64.c
CC bignum.c
/tmp/ccgzTp3R.s: Assembler messages:
/tmp/ccgzTp3R.s:1523: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1523: Error: bad instruction `ldr.w r5,[r2],#+8'
/tmp/ccgzTp3R.s:1524: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1524: Error: bad instruction `ldr.w r6,[lr],#+8'
/tmp/ccgzTp3R.s:1525: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1525: Error: bad instruction `ldr.w r7,[r2,#-4]'
/tmp/ccgzTp3R.s:1526: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1526: Error: bad instruction `ldr.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1529: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1529: Error: bad instruction `str.w r6,[lr,#-8]'
/tmp/ccgzTp3R.s:1530: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1530: Error: bad instruction `str.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1532: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1532: Error: bad instruction `ldr.w r5,[r2],#+8'
/tmp/ccgzTp3R.s:1533: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1533: Error: bad instruction `ldr.w r6,[lr],#+8'
/tmp/ccgzTp3R.s:1534: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1534: Error: bad instruction `ldr.w r7,[r2,#-4]'
/tmp/ccgzTp3R.s:1535: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1535: Error: bad instruction `ldr.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1538: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1538: Error: bad instruction `str.w r6,[lr,#-8]'
/tmp/ccgzTp3R.s:1539: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1539: Error: bad instruction `str.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1541: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1541: Error: bad instruction `ldr.w r5,[r2],#+8'
/tmp/ccgzTp3R.s:1542: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1542: Error: bad instruction `ldr.w r6,[lr],#+8'
/tmp/ccgzTp3R.s:1543: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1543: Error: bad instruction `ldr.w r7,[r2,#-4]'
/tmp/ccgzTp3R.s:1544: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1544: Error: bad instruction `ldr.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1547: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1547: Error: bad instruction `str.w r6,[lr,#-8]'
/tmp/ccgzTp3R.s:1548: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1548: Error: bad instruction `str.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1550: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1550: Error: bad instruction `ldr.w r5,[r2],#+8'
/tmp/ccgzTp3R.s:1551: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1551: Error: bad instruction `ldr.w r6,[lr],#+8'
/tmp/ccgzTp3R.s:1552: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1552: Error: bad instruction `ldr.w r7,[r2,#-4]'
/tmp/ccgzTp3R.s:1553: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1553: Error: bad instruction `ldr.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1556: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1556: Error: bad instruction `str.w r6,[lr,#-8]'
/tmp/ccgzTp3R.s:1557: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1557: Error: bad instruction `str.w r8,[lr,#-4]'
/tmp/ccgzTp3R.s:1567: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1567: Error: bad instruction `ldr.w r4,[r2],#4'
/tmp/ccgzTp3R.s:1568: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1568: Error: bad instruction `ldr.w r5,[lr]'
/tmp/ccgzTp3R.s:1570: Error: unexpected character `w' in type specifier
/tmp/ccgzTp3R.s:1570: Error: bad instruction `str.w r5,[lr],#4'
make[1]: *** [Makefile:289: bignum.o] Error 1
make[1]: Leaving directory '/tmp/mbedtls_bignum_issue/mbedtls/library'
make: *** [Makefile:18: lib] Error 2
Steps to reproduce
NOTE: Maybe distro-provided toolchains are also available that yield the same result via passing compile-flags, sorry for the tedious way of getting the toolchain env setup..
# Toolchain setup
mkdir /tmp/mbedtls_bignum_issue && cd /tmp/mbedtls_bignum_issue
wget https://github.com/openlgtv/buildroot-nc4/releases/download/webos-9f5b1a1/arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
tar xf arm-webos-linux-gnueabi_sdk-buildroot.tar.gz
# Relocate toolchain
./arm-webos-linux-gnueabi_sdk-buildroot/relocate-sdk.sh
# Build mbedtls
git clone https://github.com/Mbed-TLS/mbedtls
cd mbedtls
source /tmp/mbedtls_bignum_issue/arm-webos-linux-gnueabi_sdk-buildroot/environment-setup
make
Summary
Cleanup of ARM assembler code in bignum.c (PR #5706) broke building for ARM Cortex A9, VFPv3
System information
Mbed TLS version (number or commit id): v1.3.1, commit >= 46435f0, PR #5706
Operating system and version: Linux (Kernel headers v3.0.13) / Cross-toolchain
Configuration (if not default, please attach
mbedtls_config.h
): defaultCompiler and options (if you used a pre-built binary, please indicate how you obtained it):
Cross-toolchain: ARM Cortex-A9 / VFPv3 / soft-fp
GCC 11.2.0
Additional environment information:
Toolchain tarball: https://github.com/openlgtv/buildroot-nc4/releases/tag/webos-9f5b1a1 (arm-webos-linux-gnueabi_sdk-buildroot.tar.gz)
Expected behavior
mbedtls should compile the bignum-module successfully.
Actual behavior
Build fails, ARM opcode
ldr.w
ˋstr.wˋ is not understood by the compiler:Full output:
Steps to reproduce
NOTE: Maybe distro-provided toolchains are also available that yield the same result via passing compile-flags, sorry for the tedious way of getting the toolchain env setup..
Additional information
Starting with this commit, before PR #5706
building works again
The text was updated successfully, but these errors were encountered: