From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Inspirels Ada on cortex tutorial linker issue Date: Sun, 24 Jul 2016 08:41:19 +0100 Organization: A noiseless patient Spider Message-ID: References: <24d4ffc3-3915-4102-96ae-68d11d881443@googlegroups.com> <240a0f13-0a34-475f-999f-ba7f47be069f@googlegroups.com> <8f1332f8-89cc-4616-9834-1d2ffcfe7a4a@googlegroups.com> <97a5b5a7-4127-4610-b6a2-07f1a434a5cb@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="1cb8779fb08c1b31c8309afcb9b531dc"; logging-data="7698"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WU0L87W80dvnAnGJRC7qV5uSWnSpQbIc=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:OZl93bSz9NLDBBY9DECjuZpT/bY= sha1:iodnRU8iPTcpN71VotjQEGim8TI= Xref: news.eternal-september.org comp.lang.ada:31139 Date: 2016-07-24T08:41:19+01:00 List-Id: Devin writes: > Yes, after looking at the assembly, I recompiled using: > $ gcc -c -mcpu=cortex-m0 -mthumb -mfloat-abi=soft program.adb > > From the looks of it, the exception handling is added at compile time > when making the program.o file? Would I be able to edit system.ads to > turn off exception handling? It turns out that it's the .fnstart/.fnend assembler directives. It is indeed system.ads that needs changing, but I'd strongly advise not editing the installed one (unless you never intend to compile Ada for the Pi natively!). I've been playing around with my own native system.ads and I can't see what needs to be tweaked. However, if I create a minimal runtime system using one of the AdaCore-supplied ARM system.ads's (ravenscar-sfp-stm32f4/arch, to be exact) the offending asm constructs don't appear. To create this minimal RTS you need * a directory, say rts/ * containing an empty directory adalib/ * and a directory adainclude/ containing the system.ads to be used. Then compile with this RTS: $ gcc --RTS=rts -c -u -f -mcpu=cortex-m0 -mthumb -mfloat-abi=soft program.adb I've put a copy of the RTS I used at https://www.dropbox.com/s/iyff5ir5bl41hpd/rts.tar.gz?dl=0 Hope this works for you!