D on lm32-CPU: string argument on stack instead of register
FeepingCreature
feepingcreature at gmail.com
Wed Aug 5 12:52:50 UTC 2020
On Tuesday, 4 August 2020 at 17:36:53 UTC, Michael Reese wrote:
> Thanks for suggesting! I tried, and the union works as well,
> i.e. the function args are registered. But I noticed another
> thing about all workarounds so far:
> Even if calls are inlined and arguments end up on the stack,
> the linker puts code of the wrapper function in my final binary
> event if it is never explicitly called. So until I find a way
> to strip of uncalled functions from the binary (not sure the
> linker can do it), the workarounds don't solve the size
> problem. But they still make the code run faster.
Try -ffunction-sections -Wl,--gc-sections. That should remove all
unreferenced functions. It removes all unreferenced sections, and
writes every function into a separate section.
More information about the Digitalmars-d-learn
mailing list