Date: Wed, 31 Mar 2021 10:57:30 -0700 From: Mark Millard <marklmi@yahoo.com> To: Thomas David Rivers <rivers@dignus.com> Cc: freebsd-arm@freebsd.org Subject: Re: 32-bit executables on aarch64? Message-ID: <3C61C02F-3402-4C96-819D-856ED65F9CDE@yahoo.com> In-Reply-To: <202103311655.12VGtx3T036893@office.dignus.com> References: <202103311655.12VGtx3T036893@office.dignus.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-Mar-31, at 09:55, Thomas David Rivers <rivers at dignus.com> = wrote: > I'm playing around with a (rather-old now) 13.0-pre-pre-pre release > on Raspberry PI 4B. >=20 > I was naively thinking I could just use -m32 to create a 32-bit > executable... but the LLVM there promptly told me it didn't recognize > -m32. >=20 > I installed the gcc V9 port and it said the same thing. >=20 > This begged the question, is there no support of 32-bit ARM (armv7) > executables in the aarch64 environment? Not that you would pick to use the same paths but in my context I have: # ls -Tld /usr/obj/DESTDIRs/clang-armv7-on-aarch64/ drwxr-xr-x 18 root wheel 512 Mar 3 19:14:42 2021 = /usr/obj/DESTDIRs/clang-armv7-on-aarch64/ that contains an armv7 world installed for use with chroot. Starting without a chroot active . . . # file `which uname` /usr/bin/uname: ELF 64-bit LSB pie executable, ARM aarch64, version 1 = (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for = FreeBSD 14.0 (1400005), FreeBSD-style, not stripped # uname -apKU FreeBSD RPi4B 14.0-CURRENT FreeBSD 14.0-CURRENT = mm-src-n245445-def0058cc690 GENERIC-NODBG arm64 aarch64 1400005 1400005 # chroot /usr/obj/DESTDIRs/clang-armv7-on-aarch64/ armv7# file `which uname` /usr/bin/uname: ELF 32-bit LSB executable, ARM, EABI5 version 1 = (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, = FreeBSD-style, for FreeBSD 14.0 (1400005), not stripped armv7# uname -apKU FreeBSD RPi4B 14.0-CURRENT FreeBSD 14.0-CURRENT = mm-src-n245445-def0058cc690 GENERIC-NODBG arm armv7 1400005 1400005 (I did both buildworld builds from the same source.) There is no lib32 implementation for aarch64. So, direct execution of code for armv7 FreeBSD without being in such a chroot is not available. (I ignore qemu and the like here.) =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3C61C02F-3402-4C96-819D-856ED65F9CDE>