From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:734f:: with SMTP id q15mr5059726qtp.146.1623432777483; Fri, 11 Jun 2021 10:32:57 -0700 (PDT) X-Received: by 2002:a25:6d82:: with SMTP id i124mr7455774ybc.165.1623432777164; Fri, 11 Jun 2021 10:32:57 -0700 (PDT) Path: eternal-september.org!reader02.eternal-september.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 11 Jun 2021 10:32:56 -0700 (PDT) In-Reply-To: Injection-Info: google-groups.googlegroups.com; posting-host=5.51.16.193; posting-account=lzjH_AoAAABq5H4FTxZ1AkonVQLbXoxB NNTP-Posting-Host: 5.51.16.193 References: <34845325-0cb5-43ee-a03f-df95a8df1f22n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: ANN: Ada Resource Embedder for C, Ada and Go From: Stephane Carrez Injection-Date: Fri, 11 Jun 2021 17:32:57 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62180 List-Id: Hi Dimitry, Le vendredi 11 juin 2021 =C3=A0 18:19:18 UTC+2, Dmitry A. Kazakov a =C3=A9c= rit=C2=A0: > On 2021-06-11 15:51, St=C3=A9phane Rivi=C3=A8re wrote:=20 > > Hi Stephane,=20 > >=20 > >> I created a new tool to allow embedding any file in an Ada, C or Go bi= nary.=20 > >=20 > > This is typically what I needed to improve my current AIDE v2 project= =20 > > (Ada Instant Development Environment - source GNAT CE 2019 2020 2021 -= =20 > > target Debian / Ubuntu with subtarget station (with GNATStudio, HAC,=20 > > libs, debug aware RTS, and goodies) or server (bare minimal). > I considered embedding into relocatable libraries similar to Windows'=20 > resource, e.g. for versioning plugins etc, but then decided to use an=20 > easier and more universal method.=20 >=20 > I simply put an Ada constructing function into the library. The function= =20 > is exported. The address returned by GetProcAddress or dlsym goes to=20 > Unchecked_Conversion to an access to subprogram, and here you are.=20 >=20 > The obvious advantage of this method over embedding is that the object=20 > can be tagged of any derived type, which no embedding can do. And you=20 > can add whatever further initialization or checks you might need.=20 >=20 Can you elaborate a little? I don't see what you put in your Ada constructing function. I do see how you use it but not how and where you put the original content = or file. Let's suppose you have some documentation file 'config/example.conf'. How would you integrate it in a binary with your solution? Best regards, Stephane