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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.7.149 with SMTP id g21mr13300645ioi.11.1471790289380; Sun, 21 Aug 2016 07:38:09 -0700 (PDT) X-Received: by 10.157.39.2 with SMTP id r2mr1009298ota.10.1471790289358; Sun, 21 Aug 2016 07:38:09 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!f6no11766632ith.0!news-out.google.com!d68ni34558ith.0!nntp.google.com!f6no11766631ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 21 Aug 2016 07:38:09 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.108.152.51; posting-account=bMuEOQoAAACUUr_ghL3RBIi5neBZ5w_S NNTP-Posting-Host: 213.108.152.51 References: <24d4ffc3-3915-4102-96ae-68d11d881443@googlegroups.com> <2efe4d01-4cd4-4aea-bc54-98ea5f26ec8a@googlegroups.com> <2cf07aa6-9cbb-44bc-8042-601c57c85457@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <328fa4a3-6215-4101-835a-7eaf7ed72a8c@googlegroups.com> Subject: Re: Inspirels Ada on cortex tutorial linker issue From: Maciej Sobczak Injection-Date: Sun, 21 Aug 2016 14:38:09 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:31482 Date: 2016-08-21T07:38:09-07:00 List-Id: > I just added the code you provided directly after the Run procedure, and it linked without error. I am confused as to why it would be different from including it in a different file the way I did. Let me guess - you did not compile the noexceptionhandling.adb file or you did not add the resulting noexceptionhandling.o to the linker invocation. Note that this is a symbol linking problem, not an Ada problem. That's why language tricks are not a proper solution. Interestingly, you might as well solve it outside of Ada, for example by compiling and linking in the following C code: void __aeabi_unwind_cpp_pr0(void) {} void __aeabi_unwind_cpp_pr1(void) {} But the point of the tutorial was to demonstrate pure-Ada programming. :-) In any case, the *proper* solution is not to have these useless injections in the first place. The compiler should have an option for this. -- Maciej Sobczak * http://www.inspirel.com