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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,63ac7dccda611bc3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!z4g2000yqa.googlegroups.com!not-for-mail From: brian Newsgroups: comp.lang.ada Subject: Re: Build raw binary on Windows Date: Mon, 5 Apr 2010 05:01:48 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9f7d79d0-4d26-417d-ae14-19d26caa27db@z4g2000yqa.googlegroups.com> References: <82aatiu17p.fsf@stephe-leake.org> NNTP-Posting-Host: 122.0.18.50 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1270468908 17514 127.0.0.1 (5 Apr 2010 12:01:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 5 Apr 2010 12:01:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z4g2000yqa.googlegroups.com; posting-host=122.0.18.50; posting-account=gMAXfwoAAAA68ecE_HyeMd1oSNR8MnSb User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/4.0; GTB0.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 3.0; InfoPath.3; MS-RTC LM 8),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:10846 Date: 2010-04-05T05:01:48-07:00 List-Id: On Apr 5, 9:39=A0am, Stephen Leake wrote: > Read up on 'pragma No_Run_Time'. It's labeled obsolescent, so apparently > there's a better way to do the same thing. There is a new pragma, Restrictions, which provides a much finer degree of control > I'm not clear what you mean by "no header". The first byte of the file is the code (i.e. no ELF or COFF descriptors) > You need some way to load the code into the processor. I assume you are > first writing a boot prom, which will then load the rest of the code. So > you need a tool that will translate the object file into hex for a prom > burner. Gnu binutils must have that somewhere. Jie Zhang (Code Sourcery) recommended ObjCopy (from BinUtils), which appears to be able to take any GCC executable/object format and convert it to any other - including just a raw binary file containing just the code, which is exactly what I want. The code will be written to disk. The MBR (Master Boot Record), which is sector 0 on a PC boot disk, is loaded and called by the BIOS when the PC is powered-on/reset. The partition table is also part of the MBR, so it only leaves 440 bytes for the boot code, so I'm doing it in multiple phases, with my MBR code (written is assembly) loading my much larger standalone code (written in Ada). I'm still fighting with GNAT GPL 2009 to build my standalone Ada code, from a Windows development host. What I need is a bare bones (no tasking, exceptions, files, etc.) GNAT Run Time Library for x86. I'm going to try to create the GNAT ZFP (Zero Foot Print) RTL, but there isn't any documentation on this (and I'm not even sure all the necessary sources are in the GPL verrsion), so I'm flailing around a bit. -Brian