From: Jere <jhb.chat@gmail.com>
Subject: Re: How to emulate multiple exports
Date: Mon, 20 Apr 2020 13:48:18 -0700 (PDT)
Date: 2020-04-20T13:48:18-07:00 [thread overview]
Message-ID: <81df1525-b28f-4d7a-bb87-0699484ebf5e@googlegroups.com> (raw)
In-Reply-To: <c6744c71-7d89-4f38-ba55-d424606fbfc2@googlegroups.com>
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.
next prev parent reply other threads:[~2020-04-20 20:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 23:53 How to emulate multiple exports Jere
2020-04-20 6:27 ` Egil H H
2020-04-20 20:48 ` Jere [this message]
2020-04-20 6:52 ` Jeffrey R. Carter
2020-04-20 20:51 ` Jere
2020-04-20 9:57 ` Simon Wright
2020-04-20 20:57 ` Jere
2020-04-21 7:58 ` Simon Wright
2020-04-24 1:36 ` Jere
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox