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 2002:a05:6214:1248:: with SMTP id q8mr17100178qvv.66.1587415699366; Mon, 20 Apr 2020 13:48:19 -0700 (PDT) X-Received: by 2002:a4a:e8db:: with SMTP id h27mr6303920ooe.40.1587415699013; Mon, 20 Apr 2020 13:48:19 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 20 Apr 2020 13:48:18 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=70.109.61.2; posting-account=QF6XPQoAAABce2NyPxxDAaKdAkN6RgAf NNTP-Posting-Host: 70.109.61.2 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <81df1525-b28f-4d7a-bb87-0699484ebf5e@googlegroups.com> Subject: Re: How to emulate multiple exports From: Jere Injection-Date: Mon, 20 Apr 2020 20:48:19 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:58438 Date: 2020-04-20T13:48:18-07:00 List-Id: On Monday, April 20, 2020 at 2:27:22 AM UTC-4, Egil H H wrote: > On Monday, April 20, 2020 at 1:53:14 AM UTC+2, Jere wrote: > > I am working in a space constrained environment (256k flash) > > and I want to try and reuse the same exported function for > > all of my unused interrupt handlers. > > > > However, the Export aspect/pragma can only > > be specified once for Default. I've tried > > a few different solutions but all of them > > are not really desirable. > > > > So is there any way to do this? Or am I just > > stuck with all the code bloat? > > > > 4. Let the linker do it. > GNAT/GCC, at least, can duplicate symbols using the --defsym=alias=original command line parameter. > > You can find a working example at https://gist.github.com/egilhh/ff0e4ffd8184e85dc4865194977f3185 > > (This worked on my linux laptop, at least) > > -- > ~egilhh Thanks! I'll try it out. One of the symbols is weak, so we'll have to see how that interacts.