[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Revisiting the AArch64 bare metal sample
From: |
Gaius Mulley |
Subject: |
Re: Revisiting the AArch64 bare metal sample |
Date: |
Sun, 07 Jan 2024 15:42:43 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Robert Roland <rob.roland@outlook.com> writes:
> Hi Gaius,
>
> You posted a bare metal AArch64 sample over a year ago after an email from me
> (thank you!) - I'd like to revisit that. Looking at the example:
>
> aarch64-linux-gm2 ${GM2_OPTIONS} -flibs=min,pim -c -fmakelist -fno-exceptions
> $1.mod
> aarch64-linux-gm2 ${GM2_OPTIONS} -flibs=min,pim -c -fmakeinit -fno-exceptions
> $1.mod
> aarch64-linux-gcc ${GCC_OPTIONS} -x c -g -c -o $1_m2.o $1_m2.cpp
>
> aarch64-linux-gm2 ${GM2_OPTIONS} -flibs=min,pim -c -g -fno-exceptions $1.mod
> aarch64-linux-gm2 ${GM2_OPTIONS} -flibs=min,pim -S -g -fno-exceptions $1.mod
>
> It looks like the command line arguments:
>
> -fmakelist
> -fmakeinit
>
> have been replaced, but I can't quite tell which ones replace it?
>
> Thanks,
>
> Robert
Hi Robert,
gm2 -g -c -fscaffold-main -fgen-module-list=filename -fscaffold-static
-fno-exceptions $1.mod
are the closest equivalent options. It will generate the scaffold and
main (but without generating the source). The list of modules and order
is in filename. The filename could be used of course to generate a C
scaffold - as of yet the Python3 tool hasn't been written. I could add
one if necessary (with the same functionality as gm2lgen in the previous
releases)
hope this helps,
regards,
Gaius