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.36.253.134 with SMTP id m128mr9746206ith.4.1469327575113; Sat, 23 Jul 2016 19:32:55 -0700 (PDT) X-Received: by 10.157.5.98 with SMTP id 89mr662843otw.9.1469327575087; Sat, 23 Jul 2016 19:32:55 -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!f6no4002345ith.0!news-out.google.com!d68ni4605ith.0!nntp.google.com!f6no4007075ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 23 Jul 2016 19:32:54 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:187:8100:ea06:c417:f44a:8b31:c749; posting-account=bO_2BwoAAACOSVlJSmplhh_hzrBSzyOY NNTP-Posting-Host: 2601:187:8100:ea06:c417:f44a:8b31:c749 References: <24d4ffc3-3915-4102-96ae-68d11d881443@googlegroups.com> <240a0f13-0a34-475f-999f-ba7f47be069f@googlegroups.com> <8f1332f8-89cc-4616-9834-1d2ffcfe7a4a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <97a5b5a7-4127-4610-b6a2-07f1a434a5cb@googlegroups.com> Subject: Re: Inspirels Ada on cortex tutorial linker issue From: Devin Injection-Date: Sun, 24 Jul 2016 02:32:55 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:31137 Date: 2016-07-23T19:32:54-07:00 List-Id: On Saturday, July 23, 2016 at 12:32:09 PM UTC-4, Simon Wright wrote: > Devin writes: > > > On Saturday, July 23, 2016 at 9:34:10 AM UTC+2, Devin wrote: > >> On Saturday, July 23, 2016 at 2:57:22 AM UTC-4, Simon Wright wrote: > >> > Devin writes: > >> > > >> > > I am trying to get my environment setup, and I am using an Orange pi > >> > > pc running armbian as the OS. It is an arm based single board > >> > > computer, so I should be able to use the compiler and linker tools > >> > > natively, at least that is what I am understanding from the chapter of > >> > > the tutorial. > >> > > > >> > > I am able to compile the program from the "First Program" chapter of > >> > > the tutorial without errors, but when I attempt to link the program I > >> > > get an error reading: > >> > > > >> > > program.o:(.ARM.exidx+0x0): undefined reference to > >> > > '__aeabi_unwind_cpp_pr0' > > > Here is the output in my program.s: > > > > .cpu cortex-m0 > > .fpu softvfp > > .eabi_attribute 20, 1 > > .eabi_attribute 21, 1 > > .eabi_attribute 23, 3 > > .eabi_attribute 24, 1 > > .eabi_attribute 25, 1 > > .eabi_attribute 26, 2 > > .eabi_attribute 30, 6 > > .eabi_attribute 34, 0 > > .code 16 > > .file "program.adb" > > .global program_E > > .data > > .align 1 > > .type program_E, %object > > .size program_E, 2 > > program_E: > > .space 2 > > .text > > .align 2 > > .global run > > .code 16 > > .thumb_func > > .type run, %function > > run: > > .fnstart > > .LFB2: > > push {r7, lr} > > .save {r7, lr} > > .setfp r7, sp, #0 > > add r7, sp, #0 > > .L3: > > mov r8, r8 > > b .L3 > > .fnend > > .size run, .-run > > .ident "GCC: (Debian 4.9.2-1) 4.9.2" > > .section .note.GNU-stack,"",%progbits > > Strange. There's nothing in there to reference > __aeabi_unwind_cpp_pr0. Does "nm program.o" show a reference? > > Umm, I suppose you did actually recompile the program to produce an > object file and it's not some old program.o left lying around? 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?