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.200.37.20 with SMTP id 20mr6790175qtm.17.1469261254065; Sat, 23 Jul 2016 01:07:34 -0700 (PDT) X-Received: by 10.157.11.162 with SMTP id 31mr520827oth.16.1469261254024; Sat, 23 Jul 2016 01:07:34 -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!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!j37no4009056qta.0!news-out.google.com!d130ni11772ith.0!nntp.google.com!f6no3750396ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 23 Jul 2016 01:07:33 -0700 (PDT) In-Reply-To: <240a0f13-0a34-475f-999f-ba7f47be069f@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:187:8100:ea06:b093:dfff:fe47:78de; posting-account=bO_2BwoAAACOSVlJSmplhh_hzrBSzyOY NNTP-Posting-Host: 2601:187:8100:ea06:b093:dfff:fe47:78de References: <24d4ffc3-3915-4102-96ae-68d11d881443@googlegroups.com> <240a0f13-0a34-475f-999f-ba7f47be069f@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8f1332f8-89cc-4616-9834-1d2ffcfe7a4a@googlegroups.com> Subject: Re: Inspirels Ada on cortex tutorial linker issue From: Devin Injection-Date: Sat, 23 Jul 2016 08:07:34 +0000 Content-Type: text/plain; charset=UTF-8 X-Received-Bytes: 3684 X-Received-Body-CRC: 2046365339 Xref: news.eternal-september.org comp.lang.ada:31134 Date: 2016-07-23T01:07:33-07:00 List-Id: 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' > > > > That's to do with exception handling. It seems that your armbian > > compiler has inserted exception handling code that's not inserted by the > > raspbian compiler. I'd expect some trace of this in the program.s file > > described in the tutorial. > > > > When I compile (using -S to generate program.s) with an arm-eabi > > cross-compiler on this Mac, I get something that's almost the same as > > the tutorial. When I compile with the native compiler, aside from the > > obvious difference that it's x86_64 code, there is exception handling > > code in there. > > > > It's possible that this is because of different configuration options in > > system.ads. Before we go too far down that route, can anyone report on > > experience using raspbian/armbian? > > Thanks for the info. After looking closer, there are definitely differences in the output of my program.s file, so I think you may be on to something there. 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