[SAoC] "Druntime for Microcontrollers" project thread

IGotD- nise at nise.com
Wed Sep 30 17:40:45 UTC 2020


On Wednesday, 30 September 2020 at 17:36:27 UTC, IGotD- wrote:
>
> Yes, this is a problem. For each module you import and just use 
> one function in it you get a lot of extra code that you don't 
> use. Usually you use --function-sections (LDC2) in order make 
> it possible for the linker to remove unused functions. However 
> this doesn't do much difference at all which is strange. Same 
> flag in C++ does a difference indeed.
>
> To be honest, I think that 64KB RAM, 256KB flash is betterC 
> territory, unfortunately. However, regardless of that we should 
> be able to clean up the binary so that no unnecessary code is 
> ending up in the binary.
>
> This is a question to the LDC maintainers, if 
> --function-sections really does what it is supposed to do.

Stupid me, I forgot to compile the druntime with 
--function-sections as well, forget what I said for the moment.


More information about the Digitalmars-d mailing list