LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* some question about aarch32 for ARM64
@ 2015-02-23 12:28 loody
2015-02-23 13:27 ` Catalin Marinas
0 siblings, 1 reply; 4+ messages in thread
From: loody @ 2015-02-23 12:28 UTC (permalink / raw)
To: LKML, catalin.marinas
hi all:
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
And I download the toolchain from
http://www.linaro.org/downloads/
(linaro-toolchain-binaries 4.9 (Aarch64 little-endian))
I saw there are aarch32 support in arm64 kernel porting.
Would you mind to let us know how to get aarch32 ELF for running on
ARM64 processors?
Sincerely appreciate your kind help in advance,
PS:Below is my compile error message:
#aarch64-linux-gnu-gcc -mabi=ilp32 test.c
/media/sdb2/toolchain/arm/gcc-
linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/../lib/gcc/aarch64-linux-gnu/4.9.2/../../../../aarch64-linux-gnu/bin/ld:
skipping incompatible
/media/sdb2/toolchain/arm/gcc-linaro-aarch64-linux-gnu-4.9-2014.09_linux/bin/../lib/gcc/aarch64-linux-gnu/4.9.2/libgcc.a
when searching for -lgcc
--
Regards,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some question about aarch32 for ARM64
2015-02-23 12:28 some question about aarch32 for ARM64 loody
@ 2015-02-23 13:27 ` Catalin Marinas
2015-02-24 5:19 ` loody
0 siblings, 1 reply; 4+ messages in thread
From: Catalin Marinas @ 2015-02-23 13:27 UTC (permalink / raw)
To: loody; +Cc: LKML
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some question about aarch32 for ARM64
2015-02-23 13:27 ` Catalin Marinas
@ 2015-02-24 5:19 ` loody
2015-03-16 10:01 ` Jon Masters
0 siblings, 1 reply; 4+ messages in thread
From: loody @ 2015-02-24 5:19 UTC (permalink / raw)
To: Catalin Marinas; +Cc: LKML
hi catalin:
2015-02-23 21:27 GMT+08:00 Catalin Marinas <catalin.marinas@arm.com>:
> 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).
so per your explanation, AArch32 binary could be created by any
arm-linux-gnu-gcc which support armv7 and previous instructions.
And -mabi=ilp32 is still aarch64 but with ILP32 ABI.
appreciate your kind help ^^
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: some question about aarch32 for ARM64
2015-02-24 5:19 ` loody
@ 2015-03-16 10:01 ` Jon Masters
0 siblings, 0 replies; 4+ messages in thread
From: Jon Masters @ 2015-03-16 10:01 UTC (permalink / raw)
To: loody, Catalin Marinas; +Cc: LKML
On 2/24/15, 12:19 AM, loody wrote:
>>> 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).
> so per your explanation, AArch32 binary could be created by any
> arm-linux-gnu-gcc which support armv7 and previous instructions.
> And -mabi=ilp32 is still aarch64 but with ILP32 ABI.
> appreciate your kind help ^^
This is the correct summary.
Jon.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-03-16 10:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-23 12:28 some question about aarch32 for ARM64 loody
2015-02-23 13:27 ` Catalin Marinas
2015-02-24 5:19 ` loody
2015-03-16 10:01 ` Jon Masters
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).