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:a37:e112:: with SMTP id c18mr14023663qkm.467.1587364040982; Sun, 19 Apr 2020 23:27:20 -0700 (PDT) X-Received: by 2002:a05:6830:1d98:: with SMTP id y24mr8182704oti.76.1587364040694; Sun, 19 Apr 2020 23:27:20 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.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: Sun, 19 Apr 2020 23:27:20 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=89.8.98.7; posting-account=uulyKwoAAAA86DO0ODu--rZtbje8Sytn NNTP-Posting-Host: 89.8.98.7 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to emulate multiple exports From: Egil H H Injection-Date: Mon, 20 Apr 2020 06:27:20 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:58425 Date: 2020-04-19T23:27:20-07:00 List-Id: 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