From nobody Thu May 18 18:22:08 2023 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QMdcL6shcz4BsQN for ; Thu, 18 May 2023 18:22:26 +0000 (UTC) (envelope-from jfc@mit.edu) Received: from outgoing-exchange-3.mit.edu (outgoing-exchange-3.mit.edu [18.9.28.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.outgoing-exchange.mit.edu", Issuer "InCommon RSA Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QMdcL59KFz3H4c for ; Thu, 18 May 2023 18:22:26 +0000 (UTC) (envelope-from jfc@mit.edu) Authentication-Results: mx1.freebsd.org; none Received: from oc11exedge2.exchange.mit.edu (OC11EXEDGE2.EXCHANGE.MIT.EDU [18.9.3.18]) by outgoing-exchange-3.mit.edu (8.14.7/8.12.4) with ESMTP id 34IIMBVO030921; Thu, 18 May 2023 14:22:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1684434133; bh=TzXDAofguxmnq1MREWFI+m4DTwAiCrr3O3Y1wIkorJo=; h=From:To:CC:Subject:Date:References:In-Reply-To; b=lE+BMW0XMTpbFEPZVZWrENKS1OwhyI/einMleb0bUshI1mfxHlSDow8vM0Fx/KOeN BiapsWKZuj0hKowr0CGjzZpuS+GCNteAi4/ZQd7Q0QuLIGE7FpPFWr7K3Yhx2BYbDH iVfDTxW1URAN0wL2/ZLhDUSG7eqGyv4yitio6IRKlXK6QSCOm+VNeNqbv7BeG/o+CS OLO5wjuj3czvyBSmzy/fTuc2reYLuBgMexPDRXlJ1/NBvPm8Ctq+Blt50NV4QR161O O6E5PsJmDdw27ZNm8HI0FlAhwBb/ftx/ayjnrfQQE/jooeEISReHreXJO9+t1hLv2L 2JE/OlDI42IiA== Received: from OC11EXPO29.exchange.mit.edu (18.9.4.102) by oc11exedge2.exchange.mit.edu (18.9.3.18) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Thu, 18 May 2023 14:22:02 -0400 Received: from oc11exhyb4.exchange.mit.edu (18.9.1.100) by oc11expo29.exchange.mit.edu (18.9.4.102) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Thu, 18 May 2023 14:22:11 -0400 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.41) by oc11exhyb4.exchange.mit.edu (18.9.1.100) with Microsoft SMTP Server (TLS) id 15.0.1497.48 via Frontend Transport; Thu, 18 May 2023 14:22:11 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e9nZKDrMyfGZWW7WEYWVcvIJnQhhE/M5IVM0u7C0Aq/YWxgt526xcUDvmC2bps+GFiRr3wgG8+M/kqVkcuLAdFP7ojun4pBseT54knsI9WW7ootR0i61VIbV5KIWtI8PFzOxCUGCfWKKdDIN7Qtuh7V/aKXZH5LSJm30wkdgVgUjJI0q8DdXq2Q7oormFjRvjb2yd+NukqAH+z1RFM3Am7yZAlot896dcAep+5dPJ9f7R9/QXQ3uMXopHFW1DV56jjsqtrb26xccVL6BdYELTsP17g3mNvTKffw+CxQkjIVnRYGRYdmbrS3Ek9yBuGauDk2X9EvDwCjOVPUaj/iW1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=TzXDAofguxmnq1MREWFI+m4DTwAiCrr3O3Y1wIkorJo=; b=R0F5bK0MInz71MGdAEY5wanh/RacAlYXnA7KkxS3OnidjGZaAs+IzK8F4nGCNFhBOv9mFNLdic3h8Eyl+G4SRAZmiY9+X+wmEYDBSFRax2Mf/Ma7c7hr7c065odBXSoLCn6sMiT4l85a3u5G4uZo35XINUVvHPCUK5skFC20Gq8bZrY9MsOiGyaCGJG3LTk3cVP5GC1Y0h/By+dhCDrtHhkezAka3716iatBV8eTmPfS9/pZNZyZ4xEJwly5HFp1fJGQDfH/JIHHmuN3xD0mu/XUh5FwYtuuTkxEqap1e6KuaSSo+LhierFtzoVbtEYMuKp+yE3kTLbd7CRLTNH94A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mit.edu; dmarc=pass action=none header.from=mit.edu; dkim=pass header.d=mit.edu; arc=none Received: from DS7PR01MB7712.prod.exchangelabs.com (2603:10b6:8:7b::17) by SN6PR01MB5055.prod.exchangelabs.com (2603:10b6:805:d6::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6411.19; Thu, 18 May 2023 18:22:08 +0000 Received: from DS7PR01MB7712.prod.exchangelabs.com ([fe80::5d78:4464:66e8:94a9]) by DS7PR01MB7712.prod.exchangelabs.com ([fe80::5d78:4464:66e8:94a9%7]) with mapi id 15.20.6411.019; Thu, 18 May 2023 18:22:08 +0000 From: John F Carr To: Thomas David Rivers CC: "freebsd-arm@freebsd.org" Subject: Re: 32-bit executables on aarch64? Thread-Topic: 32-bit executables on aarch64? Thread-Index: AQHZibTgTpU99fvZzkaMEV2y0rXZua9gV9iA Date: Thu, 18 May 2023 18:22:08 +0000 Message-ID: <46BE47DA-9306-4682-8320-D2CBEB5918F7@mit.edu> References: <202305181816.34IIGA8P024382@office.dignus.com> In-Reply-To: <202305181816.34IIGA8P024382@office.dignus.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR01MB7712:EE_|SN6PR01MB5055:EE_ x-ms-office365-filtering-correlation-id: abbee6f8-09e0-446b-487c-08db57ccca97 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3CCDnqyjyqg+w4AXjHc3zATSn17InMrxvfWI8WKD6qhdDbWnnXN0UckFD8yoNxNfa/eX1vqAJC0ntykCCtCvFkKqB2+Ozw0XGoj4b0KCrn8vnjcj3CKChP/5ST8VSHZY7cGzZYRjEotzNQfWNSbDVtg0YumllHEhHswqCgUuhIFDdQ/9UHYS11i5NTrc/dzHTbrzc7Elp8/ba3HKfg6T1WFPFm5o7AAEYMv1R7Z4doJLTKQ2nmknhYNAY3nY2yzaaQhdVmdq6Mv5Y6lNSDiaKc86yC++JoFte+Gw+GY/cXTv40/FVIwMePXhZp8WNjbVeAVzTzCl3J/DDr8mpinNaymAGXY9+v1rUrwcnHfjMu+Ua8U3X1e+2pr1V+eaVCebHMCopImU3KtdNStiN3K1KGG8L60qU0h8yAt6agPkS/FwDPyqxrxBlvoFx+J47XKx6Kf0/FP0ebjV6ahUZ4wSs6+3PPt52fvNOPibChPM0Vx3SnDRFixfxyGrkrmWie3KPbINC7koFUZa/EKDaM3IsSjLoyfa/HB5Ybvn8ncPKzSrbI/nyWWOM7LOHcdZsy1PgSeO/lvm6FjtoDNNVv46NOkia1+Zzv7XKv8D6dkPPZ8= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR01MB7712.prod.exchangelabs.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(376002)(136003)(39860400002)(366004)(346002)(451199021)(478600001)(71200400001)(966005)(41300700001)(5660300002)(6486002)(4326008)(786003)(6916009)(66556008)(66446008)(64756008)(316002)(66476007)(186003)(8676002)(8936002)(6512007)(6506007)(26005)(2906002)(2616005)(76116006)(91956017)(66946007)(36756003)(38100700002)(122000001)(86362001)(38070700005)(53546011)(75432002)(40140700001)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?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JhKx7r5CsQQEQckfoqP+xoPeDfOhf0?= =?us-ascii?Q?51jWaYyPIQoxMEReCG+VQQ9/WgXIWv/A9GG9qPoYLwZF+QWqFkPYAdiK+A4C?= =?us-ascii?Q?9TnakJPKAXTPX2XDuOXdMddXrKXCevE1V1SOyliUcdoPB1e4G1QXPHz9mfB7?= =?us-ascii?Q?Fl5c/DBfywjBYTMtI9yUs9tcMIsGg0fUmoauM+GoFWLKlfhHFPHn8FPhxJfD?= =?us-ascii?Q?mOOEQQi7Ggl9A7wmxcfbi85riZjBNPbKFHkssR1KbGeEZYgr+B3BO/nZBLWd?= =?us-ascii?Q?kueNi3/6DIMESck6ec8eOHEoGOK6fWbc6PGpEfIL7TcIMQnbmxpH5NBhxde7?= =?us-ascii?Q?vVFujkvITGj9sGBzAVquuGk0Vl4D9Fu+lKnis5HwydPjtYLXmy+3i5dMkQ5k?= =?us-ascii?Q?nbjZ6CtCCPqV1CQo9plxkRmKLNNmqznpvwIZBQnPz8TDnhgBllJniUk3NuRv?= =?us-ascii?Q?5LIF5NIq3a7LFPHVVnadRj6EuyYHhLEfVzLQZbUNk0inTLE9+ZRdorwvg8DA?= =?us-ascii?Q?f/DhFPxWn/aeyE1d68KjuQAjukoDvmPaa0cS8xo1qXA2MHzsIwkw3nOlB5/3?= =?us-ascii?Q?xTJsUgDflgYJZ+GXwq6HmTrlpj53DpVum2eeHdKzNHzJcswoekLeT03IWmP3?= =?us-ascii?Q?PI1rGzlp7VMfIYbGtXXjKpfBz5Bc1cG3g6nObo/af3bVpx6eHMU5N9tn4TWM?= =?us-ascii?Q?YPDLPD99lUvBR+Py4v4=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: <84FC39DA9C49C74FA2358D6DB08573EF@prod.exchangelabs.com> Content-Transfer-Encoding: quoted-printable List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR01MB7712.prod.exchangelabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: abbee6f8-09e0-446b-487c-08db57ccca97 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 May 2023 18:22:08.5146 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 64afd9ba-0ecf-4acf-bc36-935f6235ba8b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: Nk0URI9lpF4d2Tc5M8drbdZJuBZH/EGn1JxjlYI2fGOdpvib/T1j+3m0++9Hb+gr X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR01MB5055 X-OriginatorOrg: mit.edu X-Rspamd-Queue-Id: 4QMdcL59KFz3H4c X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:3, ipnet:18.9.0.0/16, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N I had to set up a jail to test 32 bit ARM on a 64 bit host. If you get pas= t the link error, expect the program to fail at startup. $ file /bin/ls /usr/jail/armv7/bin/ls /bin/ls: ELF 64-bit LSB pie executable, ARM aarch64, version= 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for Fre= eBSD 13.2 (1302505), FreeBSD-style, stripped /usr/jail/armv7/bin/ls: ELF 32-bit LSB executable, ARM, EABI5 version 1 (Fr= eeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, FreeBSD-style= , for FreeBSD 13.2 (1302500), stripped $ /usr/jail/armv7/bin/ls ELF interpreter /libexec/ld-elf.so.1 not found, error 8 Abort trap "Not found" means "is not a 32 bit executable." Because both 32 and 64 bit= progams use the same intepreter pathname they can't both work. > On May 18, 2023, at 14:16, Thomas David Rivers wrote: >=20 >=20 > Tried the following with a small "hello world" program on=20 > FreeBSD freebsd 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-5= 25ecfdad597 GENERIC arm64 >=20 > # cc -m32 hello.c >=20 > To get these errors: >=20 > ld: error: /tmp/hello-1eb3b8.o is incompatible with /usr/lib/crt1.o > cc: error: linker command failed with exit code 1 (use -v to see invocat= ion) >=20 > Is building a 32-bit program not supported on 13.2 arm64? >=20 > man cc >=20 > gave me the CLANG doc... which didn't even mention "m32"; so perhaps > I just need a different set of options? I tried -arch arm but I still > got 64-bit code. Also, I tried several other -arch options and didn't > see a difference, even with -arch x86, I still got Aarch64 code. >=20 > - Many thanks! - > - Dave Rivers - >=20 > -- > rivers@dignus.com Work: (919) 676-0847 > Get your mainframe programming tools at http://www.dignus.com >=20