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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,55a8252137b5ef97 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local1.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 16 Dec 2004 23:20:30 -0600 From: tmoran@acm.org Newsgroups: comp.lang.ada Subject: Re: Efficiently setting up large quantities of constant data References: <2508656.W3VlADmtU1@jellix.jlfencey.com> X-Newsreader: Tom's custom newsreader Message-ID: Date: Thu, 16 Dec 2004 23:20:30 -0600 NNTP-Posting-Host: 67.161.24.234 X-Trace: sv3-47ieSEicknJ3O+/v62UgsUmJzKX3d3F0MNH4GGuxQoW6XItQAcQOSBU4hyPKNI1V0EmMW9aMG+wfWTC!7OV33e79sqnOcEMitLWHTkWlLNsLsyk/EORH84ZHIrJnssDKyWN1N2Z7kpWojw== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.22 Xref: g2news1.google.com comp.lang.ada:7018 Date: 2004-12-16T23:20:30-06:00 List-Id: >> I presume this needs to be done at the linker stage, but I don't >> see any options to link in non-object files. > >You could give "objcopy" a try. It can convert a binary file into an >object file which could then be linked normally. You could also create an asm (remember that?) file with the data and link the resultant object file. In either case, you can use MS Link to combine the obj files into an exe for Windows. >See the man page for the --binary-architecture option. You just should >be _very_ sure about what the binary file contains and how to map it >onto the appropriate Ada-type(s). What's wrong with just creating an Ada source file with all the constant data? That would give you the advantage of the compiler doing the worrying about the data representation and layout and doing some checking that you are accessing things correctly.