Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752416AbbBWN1w (ORCPT ); Mon, 23 Feb 2015 08:27:52 -0500 Received: from foss-mx-na.arm.com ([217.140.108.86]:44348 "EHLO foss-mx-na.foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752360AbbBWN1v (ORCPT ); Mon, 23 Feb 2015 08:27:51 -0500 Date: Mon, 23 Feb 2015 13:27:37 +0000 From: Catalin Marinas To: loody Cc: LKML Subject: Re: some question about aarch32 for ARM64 Message-ID: <20150223132736.GH32737@e104818-lin.cambridge.arm.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1150 Lines: 32 On Mon, Feb 23, 2015 at 12:28:57PM +0000, loody wrote: > I follow below instructions to compile a simple c file as aarch32 but in vain. > > https://gcc.gnu.org/onlinedocs/gcc-4.9.1/gcc/AArch64-Options.html#AArch64-Options On the above link, there are no instructions on how to compile an AArch32 application with the AArch64 compiler. You need an AArch32 gcc (e.g. arm-linux-gnu-gcc, not aarch64-linux-gnu-gcc). > I saw there are aarch32 support in arm64 kernel porting. Yes, that's to support AArch32 binaries (ARMv8/v7/...). > Would you mind to let us know how to get aarch32 ELF for running on > ARM64 processors? Just use the right compiler. > PS:Below is my compile error message: > #aarch64-linux-gnu-gcc -mabi=ilp32 test.c -mabi=ilp32 is entirely different from an AArch32 compiler. The above still generates AArch64 but with the ILP32 ABI (sizeof int/long/pointer is 32-bit). -- Catalin -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/