Re: Generated assembly for imported modules on MSP430

2018-05-04 Thread jba
I read that perhaps the GCC flag -flto can remove those pointless calls if they only return.

Re: Generated assembly for imported modules on MSP430

2018-05-04 Thread jangko
> The functions that are being called are referenced by the call so the linker > can't remove them see issue [#6134](https://github.com/nim-lang/Nim/issues/6134)

Re: Generated assembly for imported modules on MSP430

2018-05-03 Thread jba
So marking them as inline and then recompiling didn't work. With the way the compiler currently works the extra bytes wasted seems unavoidable. I think maybe it ends up not being a big deal because larger programs will have modules that likely need initialization of some kind. Can anyone tell m

Re: Generated assembly for imported modules on MSP430

2018-05-03 Thread jba
Thanks for the response. I have read that and partially implemented it where it made sense for my use case. I'm think this is a different problem however. I have already removed everything that isn't referenced, which is the main point of the article. The functions that are being called are refe

Re: Generated assembly for imported modules on MSP430

2018-05-02 Thread Stefan_Salewski
This blog post of Mr Felsing may help you to get minimal total executable size: [https://hookrace.net/blog/nim-binary-size](https://hookrace.net/blog/nim-binary-size)/

Generated assembly for imported modules on MSP430

2018-05-02 Thread jba
Hello, I am examining the generated assembly of my toy program for msp430 and I think I might be do something incorrectly. Regardless, I would like to fix this. Here is a portion of the listing using objdump -d . I will annotate the call addresses with the symbol name: 813e :