Page 1 of 1

LTO and weak definitions  Topic is solved

Posted: Tue Apr 16, 2019 1:19 pm
by wurstnase
Hi,

I don't know if ChibiOS is affected. But I just jumped over an GCC bug again.
If you have an assembler file, which has weak symbols, and the linker will see this weak object file after the regular strong implementation, it will drop it.

Check also:
https://bugs.launchpad.net/gcc-arm-embe ... ug/1747966

This starts with 7.2.1 and is still not gone.

Re: LTO and weak definitions

Posted: Tue Apr 16, 2019 1:57 pm
by Giovanni
This is why crt1.c is a C file :), I placed the weak parts in there written in C.

You could try inline assembler as workaround.

Giovanni

Re: LTO and weak definitions

Posted: Tue Apr 16, 2019 6:56 pm
by wurstnase
Hmmm... In my case it's not chibi-related. I have a startup code from st. And the SysTick is weak.
I can see, that the interrupt handler in chibi are also weak in assembler (vector.S).